Package org.apache.cxf.aegis.util.jdom
Class StaxBuilder
java.lang.Object
org.apache.cxf.aegis.util.jdom.StaxBuilder
Builds a JDOM
org.jdom.Document using a
XMLStreamReader.- Author:
- Tatu Saloranta, Bradley S. Huffman, Benson I. Margulies, mods for CXF to allow reading a portion of a stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether ignorable white space should be ignored, ie not added in the resulting JDOM tree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jdom.Documentbuild(InputStream is) org.jdom.Documentorg.jdom.DocumentThis will build a JDOM tree given a StAX stream reader.org.jdom.JDOMFactoryReturns the currentJDOMFactoryin use, if one has been previously set withsetFactory(org.jdom.JDOMFactory), otherwise null.voidsetAdditionalNamespaces(Map<String, String> additionalNamespaces) voidsetFactory(org.jdom.JDOMFactory f) voidsetIgnoreWhitespace(boolean state)
-
Field Details
-
cfgIgnoreWS
protected boolean cfgIgnoreWSWhether ignorable white space should be ignored, ie not added in the resulting JDOM tree. If true, it will be ignored; if false, it will be added in the tree. Default value if false.
-
-
Constructor Details
-
StaxBuilder
public StaxBuilder()Default constructor. -
StaxBuilder
-
-
Method Details
-
getAdditionalNamespaces
-
setAdditionalNamespaces
-
setFactory
public void setFactory(org.jdom.JDOMFactory f) -
setIgnoreWhitespace
public void setIgnoreWhitespace(boolean state) -
getFactory
public org.jdom.JDOMFactory getFactory()Returns the currentJDOMFactoryin use, if one has been previously set withsetFactory(org.jdom.JDOMFactory), otherwise null.- Returns:
- the factory builder will use
-
build
This will build a JDOM tree given a StAX stream reader. This API explicitly supports building mid-stream.- Parameters:
r- Stream reader from which input is read.- Returns:
Document- JDOM document object.- Throws:
XMLStreamException- If the reader threw such exception (to indicate a parsing or I/O problem)
-
build
- Throws:
XMLStreamException
-
build
- Throws:
XMLStreamException
-