1

I want to ask if it is possible to configure the SAX Poco parser so that it returns the original characters of the xml file. In fact, when i have in the xlm file & lt; to encode < i have as a result of the SAX parser < while i want to have the original encoded characters as it is & lt; How do i avoid this decoding happening form SAX parser.

Thanks

Takoua
  • 11
  • 3
  • 2
    What exactly is your question? What do you mean by "raw" characters? Give us an example. Maybe show some code of something you have tried. –  May 08 '18 at 17:56
  • Thanks for your response, in fact when i have in the xlm file : a < b where < is encoded for < i have as a result of the poco parser a < b while i have to find the same characters as the input xml, i want to have a < b , can you please help me. – Takoua May 09 '18 at 08:27
  • i mean by raw characters, the input characters in the xml file – Takoua May 09 '18 at 08:28
  • it's using the SAX (Simple API for XML) in the implementation of the method void characters (XMLChar ch [] const, int start, int length) of the ContentHandler interface – Takoua May 09 '18 at 08:59
  • Details like this should be in the question itself. [Edit] the question and explain what you want to do. –  May 09 '18 at 11:54
  • Thanks @jdv, it's done ;) – Takoua May 09 '18 at 13:15
  • Thanks. Ok, so you want to parse some XML but keep the raw HTML entities without decoding them to their rendered characters. Related: https://stackoverflow.com/q/1777878/1531971 –  May 09 '18 at 14:16
  • yes, it is exactly what i want to do with C++ langage and SAX parser – Takoua May 09 '18 at 14:59
  • You probably need to look at https://www.appinf.com/docs/poco/Poco.XML.XMLReader.html and where it sets/gets the "EntityResolver". There are some hints about that around the web. –  May 09 '18 at 15:24
  • Thanks very much jdv – Takoua May 09 '18 at 16:11

0 Answers0