ProXML and special characters
in
Contributed Library Questions
•
2 years ago
Hello,
I am using proxml in order to import structured information from a xml file. It works fine, except for one thing: the special characters are converted to html entities: «'», to «'», for example. Is there any way that I can get the characters correctly from the xml file or unescape after they're imported?
My xmlEvent:
I would appreciate any help or tips!
Thank you!
I am using proxml in order to import structured information from a xml file. It works fine, except for one thing: the special characters are converted to html entities: «'», to «'», for example. Is there any way that I can get the characters correctly from the xml file or unescape after they're imported?
My xmlEvent:
- void xmlEvent(proxml.XMLElement element) {
citacoesXML = element;
// citacoesXML.printElementTree(" ");
proxml.XMLElement citacaoXML;
proxml.XMLElement quoteAuthor;
proxml.XMLElement authorQuote;
// Contar o numero de quotes
int childrenCount = citacoesXML.countChildren();
// Definir o tamanho das arrays de quotes e autor, as quais a classe "frase" vai aceder, de acordo
// com o numero de quotes no xml
quoteXML = new String[childrenCount];
authorXML = new String[childrenCount];
for(int i = 0; i < citacoesXML.countChildren(); i++) {
citacaoXML = citacoesXML.getChild(i);
quoteAuthor = citacaoXML.getChild(2);
authorQuote = citacaoXML.getChild(0);
quoteXML[i] = quoteAuthor.getChild(0).toString();
authorXML[i] = authorQuote.getChild(0).toString();
}
}
- <?xml version="1.0" encoding="UTF-9">
I would appreciate any help or tips!
Thank you!
1