function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SimbaSimba 

XMLStreamReader or XMDOM for parsing large response - which has better performance ?

I need to parse a really huge response. The response size is much more than 100,000 characters. Is it faster to user XMLStreamReader or XMLDom (the library created by salesforce person) in order to parse the whole response

Thanks

Regards

David VPDavid VP
Streamreader should be faster.

XMLDom has more functionality but if first needs to create an in-memory object representation of your entire XML Document (and that consumes enormous amounts of memory).

The StreamReader just goes over the data, looking at the tags it encounters one by one ...



-David

SimbaSimba

Makes full sense. Thanks a lot for clarifying that.

Warm Regards..