Class SimpleSAXParser

java.lang.Object
org.eclipse.rdf4j.common.xml.SimpleSAXParser

public class SimpleSAXParser extends Object
An XML parser that generates "simple" SAX-like events from a limited subset of XML documents. The SimpleSAXParser can parse simple XML documents; it doesn't support processing instructions or elements that contain both sub-element and character data; character data is only supported in the "leaves" of the XML element tree.

Example:

Parsing the following XML:

 <?xml version='1.0' encoding='UTF-8'?>
 <xml-doc>
   <foo a="1" b="2&amp;3"/>
   <bar>Hello World!</bar>
 </xml-doc>
 

will result in the following method calls to the SimpleSAXListener:

 startDocument()
 startTag("xml-doc", emptyMap, "")

 startTag("foo", a_b_Map, "")
 endTag("foo")

 startTag("bar", emptyMap, "Hello World!")
 endTag("bar")

 endTag("xml-doc")
 endDocument()