Message Boards Message Boards

Does Mathematica have a SAX parser for XML?

Posted 7 years ago

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?

2 Replies

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

Thanks for the confirmation.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract