I was wondering if there is something for blackberry to escape html values, basically I want to show just plain text that's coming from and rss. However the rss is returning values likes this:
<item><guid isPermaLink="true"><![CDATA[http://www4.elcomercio.com/deportes
/Vettel_F1_China.aspx]]>
</guid>
<title><![CDATA[ Vettel domina primer día de ensayos en China]]></title>
<description><![CDATA[El alemán Sebastian Vettel, de Red Bull, realizó el mejor tiempo en la segunda sesión de entrenamientos libres del Gran Premio de China de Fórmula 1, el viernes en el circuito de Shanghai, tercera prueba del campeonato, tras haber dominado el primer ensayo.<br />
<br />
I can sucesffuly retrieve the title and description tags content, but now I would like to remove all the CDATA, <br /> or any possible html tags that I could find.
I tried using JSoup however it uses JVM 1.5+ classes like Enum, and as result I couldn't preverify the jar to use it on Blackberry-JavaME. Also I haven't found any class in the RIM API that could help on this task, maybe I missed a class or a library that I could use. This is just to avoid writing code that's probably already done on several libraries.
Thanks a lot.
Have you tried using SAX Parser and just getting the values for the characters(...) method for each endElement ?
Here is a brief tutorial on SAX Parser for Blackberry:
http://jsinghfoss.wordpress.com/2009/09/06/sax-parsing-revising/
Well, couldn't find a prerolled class, however there is a library that allows us to use regex in Blackberry projects, it's called regexp-me. Helped me to remove the tags in an easy way. SAX Parser is also a solution, but if you want something more simple like in this case, I think regexp-me is the best option.
Thanks.
Related
I'm using JabRef as a reference manager and LibreOffice writer as document editor.
I'm using the ooPluging to cite JabRef sources in LibreOffice, but I'm having troubles with sources with institutional authors. For example, the following source
#Misc{RevistaSemana2013,
Title = {Un buen año para la economía},
HowPublished = {Online. Available at http://www.foo.bar},
Institution = {Revista Semana},
Month = {Dec},
Year = {2013},
Comment = {Last visited 21-10-2015},
}
will be appear in the references as:
Revista Semana (2013a). Un buen año para la economía. Online. Available at http://www.foo.bar. Last visited 21-10-2015.
But will be cited as (Semana 2013a).
My style file can be found in http://pastebin.com/j5vNgyDR
Thanks,
It looks to me like JabRef always splits up the last name, even if it's an institution (java code):
AuthorList al = AuthorList.getAuthorList(author);
sb.append(getAuthorLastName(al, 0));
However I found a simple workaround. In the source, use a non-breaking space instead of an ordinary space between Revista and Semana. Then we get the desired result in LibreOffice:
(Revista Semana 2013)
you might use an additional curly bracket:
{{Revista Semana}}
as mentioned in the biblatex manual, section 2.3.3, for corporate authors:
http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/biblatex/doc/biblatex.pdf
I have a running VoiceXML application that works ok in Nexmo. If I set any language other than en-US the calls want get answered. I just change en xml:lang as in:
<vxml application="/dialogue/root/50b9bab0-9ce8-4d7a-9389-09f06aa8f9ee" version="2.1" xml:lang="es-es">
I have tried in the vxml above and also in the prompt tag. Any language like es-es, es-ES... even en-UK will make my vxml stop working in Nexmo.
I am sure script is OK as I can change en-US female and male voice with en-us-male and en-us-female. That works.
Am I missing something?
(I don't think it makes a difference but I use the great Rivr java library to generated vxml)
for me "fr-ca" doesnt work but "fr-ca-female" does work
At the W3C Internationalization Checker page, (http://validator.w3.org/i18n-checker/ ) I got no errors about language issues for my website fxrehber.com but when I check my website for web crawlers at a website like http://tools.seobook.com/general/spider-test/ I get the text like these:
SPK Lisansl Forex irketlerinin Kar la t rmalar ve Kullan c Yorumlar
FXrehber com Forex irketleri kar la t rma ve yorumlar Forex'te g venle
i lem yap n T rkiye'de ofisi bulunan
My website is in Turkish, so it should look like this:
SPK Lisanslı Forex şirketlerinin Karşılaştırmaları ve Kullanıcı Yorumları
FXrehber com Forex şirketleri karşılaştırma ve yorumları Forex'te güvenle
işlem yapın Türkiye'de ofisi bulunan
I'm not sure if it's normal behaviour and this is a problem for SEO.
Consider the tools.seobook.com service useless; it apparently cannot even read UTF-8 data correctly (when in document body – it seems to get the meta tag contents OK, making the behavior even more absurd).
If you search for e.g. “SPK Lisanslı Forex şirketlerinin Karşılaştırmaları” in Google, you’ll see your page well placed, with the extract of page content correctly displayed by Google. Ditto when searching with Bing, Yahoo, Yandex.
I have Windows 7 64 bit. I installed these with the given order:
Miktex (Basic-miktex-2.9.4521.exe)
Ghost script (gs905w32.exe)
GSView (gsv50w32.exe)
Pstoedit (pstoeditsetup_win32.exe)
Inkscape (Inkscape-0.48.2-1-win32.exe)
However, I still am not able to see Extensions -> Render -> Latex Formula in Inkscape. What is missing?
Okay, after adding miktext, gs and pstoedit to the PATH; it worked fine.
For example, in order to add pstoedit to the path:
Computer > Properties > Advanced > Environment Variables > PATH > Edit
Add the following:
;C:\Program Files (x86)\pstoedit;
PS: Don't forget semi colons.
Good luck.
This helped me, but I still got errors. I solved them after a while though, so this is what you have to look out for:
When you add the programs to the path, don't use spaces after a semicolon!!
When you type your code later in Incscape, it requires the dollar signs to indicate a formula, even though it asks for LaTeX Formula, so it seems you should already be in math mode. Example: $\vec{r_p}$. You still get lots of warnings, but at least it produces what you want.
Just adding this in case others may have the same problem :)
I would like to add that the latest ghostscript version (at the time of writing) 9.22 throws some depriciation errors but using the version suggested in the accepted answer (by Sait), 9.05, fixed everything for me. Thanks!
I used the following versions on Windows 10:
Miktex (MiKTeX2.9, 32 bit I think; this one may be Basic-miktex-2.9.4521.exe)
Ghost script (gs905w32.exe and NOT the latest at the time, gs922w32.exe)
GSView (gsv50w32.exe)
Pstoedit (pstoeditsetup_win32.exe)
ImageMagick (ImageMagick- 7.0.7-Q16)
Inkscape (Inkscape 0.92.2 (5c3e80d, 2017-08-06), presumably 32 bit)
Caveats:
I used 32 bit versions, the 64 bit did not work at first some other problem)
Ghost Script version 9.22 was throwing some depreciation errors. Version 9.05 worked like a charm.
While installing pstoedit I checked: ".h and .lib files for using the pstoedit.dll in other programs" and "plugins SVG, MIF, EMF, CGM format (shareware)"
I had image magick installed.
Source: http://knowledgepayback.blogspot.be/2017/09/surface-pro-2017-optimising-for.html
I found the existing answer unsatisfactory. MikTeX already ships with tools to convert PDF to SVG, and to compile LaTeX to PDF, so the dependencies seem rather artificial. I have found that one can build a newer version of the LaTeX extension which uses these tools https://github.com/juanjosegarciaripoll/inkscape-latex-miktex
Just copy the *.inx and *.py files into the Inkscape/share/extensions folder and start Inkscape. The interface is very primitive, and equations cannot be edited, but it works.
The procedure to make latex work with Inkscape is explained in this site ...
The only things that should be checked are the paths added to environment variables if more recent versions are used.
Here is a quote of the proposed procedure (sorry, it is in Frensh):
Choisissez les fichiers d’installation 32 ou 64 bits en fonction de votre système. Si vous ne savez pas lequel il vous faut : Clic droit sur l’icône Ordinateur (sur le Bureau ou dans le Menu Windows) → Propriétés, l’information est affichée dans Système : Type du système.
Installer Miktex, Ghostscript, Ghostview, ImageMagick
Installer pstoedit en personnalisant l’installation :
Installation dans le dossier de Gostgum : C:\Program Files\Ghostgum\pstoedit
Cocher : « .h and .lib files for using the pstoedit.dll in other programs » et « plugins SVG, MIF, EMF, CGM format (shareware) »
Copier les fichiers textext.py et textext.inx dans : C:\Program Files\Inkscape\share\extensions
Extraire site-packages.zip dans : C:\Program Files\Inkscape\python\Lib\site-packages
Clic droit Ordinateur (sur le Bureau ou dans le Menu Windows) : Propriétés → Paramètres système avancés → Variables d'environnement… Dans Variables système → Path, ajouter :
;C:\Program Files\gs\gs9.15\lib;C:\Program Files\gs\gs9.15\bin;C:\Program Files\ghostgum\pstoedit
On my site sinj.com.hr I have croatian diacritic letters which I encode to utf-8 html entities. For example,
Obiteljski liječnici, na području koje
pokriva sinjska ispostava Nastavnog
zavoda za javno zdravstvo, danas su
počeli s cijepljenjem protiv sezonske
gripe. Dodajmo kako cjepivo protiv
sezonske gripe nije otporno na virus
nove pandemijske H1N1 gripe.
Cijepljenje protiv svinjske gripe
počet će u prosincu
in html is printed like this:
Obiteljski liječnici, na području koje pokriva sinjska ispostava Nastavnog zavoda za javno zdravstvo, danas su počeli s cijepljenjem protiv sezonske gripe. Dodajmo kako cjepivo protiv sezonske gripe nije otporno na virus nove pandemijske H1N1 gripe. Cijepljenje protiv svinjske gripe počet će u prosincu
I wonder, how should this string be printed in meta tag? I'm asking this because some search engines in their results show utf-8 entity instead of character. In google it works fine, but Yahoo doesn't show it correctly (if link is not good, try to search for "sinj")
There's really not much you can do. Yahoo search engine is the one at fault here. You could try encoding the characters in UTF-8 directly, though, since you have declared the content-type meta tag correctly.