|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnu.staldal.xtree.XTreeUtil
public final class XTreeUtil
Some utility methods for XTree. All methods in this class are static.
| Method Summary | |
|---|---|
static Element |
parseXML(org.xml.sax.InputSource xmlInput,
boolean validateDTD,
java.lang.String schemaType,
org.xml.sax.InputSource schema)
Parse an XML document into an XTree. |
static Element |
parseXMLSequential(org.xml.sax.InputSource xmlInput,
boolean validateDTD,
java.lang.String schemaType,
org.xml.sax.InputSource schema,
ElementHandler handler)
Parse an XML document into a list of XTree:s, one for each element under the root. |
static void |
serialize(Node tree,
java.io.OutputStream os)
Serialize an XTree into an OutputStream. |
static void |
serialize(Node tree,
java.io.OutputStream os,
java.util.Properties prop)
Serialize an XTree into an OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Element parseXML(org.xml.sax.InputSource xmlInput,
boolean validateDTD,
java.lang.String schemaType,
org.xml.sax.InputSource schema)
throws org.xml.sax.SAXParseException,
org.xml.sax.SAXException,
java.io.IOException
xmlInput - the input to parsevalidateDTD - validate using DTDschemaType - the type of schema to use, or null
for no schema validationschema - the schema to use, or null
for no schema validation
org.xml.sax.SAXParseException - if the XML data is not valid
org.xml.sax.SAXException - if any other error occurs while parsing the XML data
java.io.IOException - if there was some I/O error while reading the input.
public static Element parseXMLSequential(org.xml.sax.InputSource xmlInput,
boolean validateDTD,
java.lang.String schemaType,
org.xml.sax.InputSource schema,
ElementHandler handler)
throws org.xml.sax.SAXParseException,
org.xml.sax.SAXException,
java.io.IOException
xmlInput - the input to parsevalidateDTD - validate using DTDschemaType - the type of schema to use, or null
for no schema validationschema - the schema to use, or null
for no schema validationhandler - handler to invoke for each element
org.xml.sax.SAXParseException - if the XML data is not valid
org.xml.sax.SAXException - if any other error occurs while parsing the XML data
java.io.IOException - if there was some I/O error while reading the input.
public static void serialize(Node tree,
java.io.OutputStream os)
throws java.io.IOException
tree - the XTree to serializeos - the OutputStream to write to
java.io.IOException - if any error occurs
public static void serialize(Node tree,
java.io.OutputStream os,
java.util.Properties prop)
throws java.io.IOException
tree - the XTree to serializeos - the OutputStream to write toprop - output properties
java.io.IOException - if any error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||