I am receiving an XML document from a REST service which shall be parsed using SAX. Please see the following example which was generated out of the XSD.
Setting up th
If it's a reasonably small xml document and the memory/throughput constraints aren't prohibitive to an in memory solution, then you could use JAXB instead. You can generate the required classes from the XSD and simply unmarshall the xml into java objects. If you must use a streaming parser, then consider using StAX instead, I generally find this more intuitive.