|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.run.xml.SaxParser
public class SaxParser
A simple XML parser. The public interface consists of nearly identical methods: parseXml(...) which produce a tree of SimpleElement objects
Constructor Summary | |
---|---|
SaxParser()
Construct a SaxParser. |
|
SaxParser(boolean fAllowComments)
Construct a SaxParser. |
Method Summary | |
---|---|
protected static Parser |
getParser()
Get an instance of non-validating SAX parser |
protected XmlElement |
instantiateRoot(String sRoot)
Instantiate an XmlElement implementation for a root element. |
static void |
main(String[] asParam)
Unit test: create a simple parser, parse and output the result |
XmlElement |
parseXml(InputSource input)
Parse the specified InputSource into a tree of XmlElement objects ignoring any XML nodes other then elements, text or comments (in a case of SaxParser that allows comments). |
protected XmlElement |
parseXml(InputSource input,
XmlElement xmlRoot)
|
XmlElement |
parseXml(InputStream input)
Parse the specified InputStream into a tree of XmlElement objects ignoring any XML nodes other then elements, text or comments (in a case of SaxParser that allows comments). |
XmlElement |
parseXml(Reader input)
Parse the specified Reader into a tree of XmlElement objects ignoring any XML nodes other then elements, text or comments (in a case of SaxParser that allows comments). |
XmlElement |
parseXml(String sXml)
Parse the specified String into a tree of XmlElement objects ignoring any XML nodes other then elements, text or comments (in a case of SaxParser that allows comments). |
XmlElement |
parseXml(String sXml,
XmlElement elRoot)
Parse the specified String into a tree of XmlElement objects (same as above) having the specified [empty] XmlElement a root Note: this method is used by de-serialization (see SimpleElement#readExternal) |
Constructor Detail |
---|
public SaxParser()
public SaxParser(boolean fAllowComments)
fAllowComments
- if true, the resulting tree may contain
the XMLValue nodes that contain comments;
otherwize all comments are ignoredMethod Detail |
---|
public static void main(String[] asParam)
public XmlElement parseXml(String sXml) throws SAXException
SAXException
public XmlElement parseXml(String sXml, XmlElement elRoot) throws SAXException
SAXException
public XmlElement parseXml(InputStream input) throws SAXException
SAXException
public XmlElement parseXml(Reader input) throws SAXException
SAXException
public XmlElement parseXml(InputSource input) throws SAXException
SAXException
protected XmlElement parseXml(InputSource input, XmlElement xmlRoot) throws SAXException
SAXException
protected XmlElement instantiateRoot(String sRoot)
sRoot
- root name
protected static Parser getParser() throws Exception
Exception
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |