Package net.sf.jasperreports.engine.util
Class JRXmlUtils
java.lang.Object
net.sf.jasperreports.engine.util.JRXmlUtils
XML parsing utilities.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanstatic DocumentcreateDocument(Node sourceNode) static DocumentcreateDocument(Node sourceNode, boolean isNamespaceAware) Creates a document having a node as root.static DocumentBuilderstatic DocumentBuildercreateDocumentBuilder(boolean isNamespaceAware) Creates a XML document builder.static Documentstatic DocumentParses a file into a document.static Documentparse(InputStream is) static Documentparse(InputStream is, boolean isNamespaceAware) Parses an input stream into a XML document.static Documentstatic DocumentParses a document specified by an URI.static Documentstatic DocumentParses an URL stream as a XML document.static Documentparse(InputSource is) static Documentparse(InputSource is, boolean isNamespaceAware) Parses an input source into a document.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_DOCUMENT_BUILDER_FACTORY_CREATION_FAILURE
- See Also:
-
EXCEPTION_MESSAGE_KEY_DOCUMENT_PARSING_FAILURE
- See Also:
-
PROPERTY_ALLOW_DOCTYPE
- See Also:
-
FEATURE_DISALLOW_DOCTYPE
- See Also:
-
-
Method Details
-
parse
- Throws:
JRException
-
parse
Parses an input source into a document.- Parameters:
is- the input source- Returns:
- the parsed document
- Throws:
JRException
-
parse
- Throws:
JRException
-
parse
Parses a document specified by an URI.- Parameters:
uri- the URI- Returns:
- the parsed document
- Throws:
JRException
-
parse
- Throws:
JRException
-
parse
Parses a file into a document.- Parameters:
file- the XML file- Returns:
- the document
- Throws:
JRException
-
parse
- Throws:
JRException
-
parse
Parses an input stream into a XML document.- Parameters:
is- the input stream- Returns:
- the document
- Throws:
JRException
-
parse
- Throws:
JRException
-
parse
Parses an URL stream as a XML document.- Parameters:
url- the URL- Returns:
- the document
- Throws:
JRException
-
createDocumentBuilder
- Throws:
JRException
-
createDocumentBuilder
Creates a XML document builder.- Returns:
- a XML document builder
- Throws:
JRException
-
allowDoctype
protected static boolean allowDoctype() -
createDocument
- Throws:
JRException
-
createDocument
Creates a document having a node as root.- Parameters:
sourceNode- the node- Returns:
- a document having the specified node as root
- Throws:
JRException
-