Message Boards Message Boards

Does Mathematica have a SAX parser for XML?

GROUPS:

I see that Mathematica has the ability to import XML. However, it seems that it is only capable of reading the entire XML document into memory at once as is typical of a DOM parser. This limits processing to XML files which fully fit into memory. An XML SAX parser (https://en.wikipedia.org/wiki/Simple_API_for_XML) is able to process large XML files using an event model that does not require loading the whole file into memory. Does Mathematica offer a SAX processor or analogous technique for processing XML?

POSTED BY: Donald Pellegrino
Answer
4 months ago

Maybe it has it internally, but 'from the outside': no. Though making one yourself, should not be tooooo hard right? It all depends on how error-tolerant you need it to be…

POSTED BY: Sander Huisman
Answer
4 months ago

Thanks for the confirmation.

POSTED BY: Donald Pellegrino
Answer
4 months ago

Group Abstract Group Abstract