Package org.apache.axiom.om
Class OMXMLBuilderFactory
- java.lang.Object
-
- org.apache.axiom.om.OMXMLBuilderFactory
-
public class OMXMLBuilderFactory extends Object
Provides static factory methods to create various kinds of object model builders from different types of input sources. The methods defined by this class are the starting point to parse XML documents into Axiom trees.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OMXMLParserWrappercreateOMBuilder(InputStream in)Create an object model builder that reads a plain XML document from the provided input stream with the default parser configuration defined byStAXParserConfiguration.DEFAULT.static OMXMLParserWrappercreateOMBuilder(Reader in)Create an object model builder that reads a plain XML document from the provided character stream with the default parser configuration defined byStAXParserConfiguration.DEFAULT.static OMXMLParserWrappercreateOMBuilder(OMFactory omFactory, InputStream in)Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with the default parser configuration defined byStAXParserConfiguration.DEFAULT.static OMXMLParserWrappercreateOMBuilder(OMFactory omFactory, Reader in)Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with the default parser configuration defined byStAXParserConfiguration.DEFAULT.static OMXMLParserWrappercreateOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, InputStream in)Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with a given parser configuration.static OMXMLParserWrappercreateOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, Reader in)Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with a given parser configuration.static OMXMLParserWrappercreateOMBuilder(StAXParserConfiguration configuration, InputStream in)Create an object model builder that reads a plain XML document from the provided input stream with a given parser configuration.static OMXMLParserWrappercreateOMBuilder(StAXParserConfiguration configuration, Reader in)Create an object model builder that reads a plain XML document from the provided character stream with a given parser configuration.static OMXMLParserWrappercreateSOAPModelBuilder(InputStream in, String encoding)Create an object model builder for SOAP that reads a message from the provided input stream, using a given charset encoding.static OMXMLParserWrappercreateStAXOMBuilder(XMLStreamReader parser)Create an object model builder for plain XML that pulls events from a StAX stream reader.static OMXMLParserWrappercreateStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)Create an object model builder that pulls events from a StAX stream reader using a specified object model factory.
-
-
-
Method Detail
-
createStAXOMBuilder
public static OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser)
Create an object model builder for plain XML that pulls events from a StAX stream reader.- Parameters:
parser- the stream reader to read the XML data from- Returns:
- the builder
-
createStAXOMBuilder
public static OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)
Create an object model builder that pulls events from a StAX stream reader using a specified object model factory.- Parameters:
omFactory- the object model factory to useparser- the stream reader to read the XML data from- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(InputStream in)
Create an object model builder that reads a plain XML document from the provided input stream with the default parser configuration defined byStAXParserConfiguration.DEFAULT.- Parameters:
in- the input stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration, InputStream in)
Create an object model builder that reads a plain XML document from the provided input stream with a given parser configuration.- Parameters:
configuration- the parser configuration to usein- the input stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, InputStream in)
Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with the default parser configuration defined byStAXParserConfiguration.DEFAULT.- Parameters:
omFactory- the object model factory to usein- the input stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, InputStream in)
Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with a given parser configuration.- Parameters:
omFactory- the object model factory to useconfiguration- the parser configuration to usein- the input stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(Reader in)
Create an object model builder that reads a plain XML document from the provided character stream with the default parser configuration defined byStAXParserConfiguration.DEFAULT.- Parameters:
in- the character stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration, Reader in)
Create an object model builder that reads a plain XML document from the provided character stream with a given parser configuration.- Parameters:
configuration- the parser configuration to usein- the character stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Reader in)
Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with the default parser configuration defined byStAXParserConfiguration.DEFAULT.- Parameters:
omFactory- the object model factory to usein- the character stream representing the XML document- Returns:
- the builder
-
createOMBuilder
public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, Reader in)
Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with a given parser configuration.- Parameters:
omFactory- the object model factory to useconfiguration- the parser configuration to usein- the character stream representing the XML document- Returns:
- the builder
-
createSOAPModelBuilder
public static OMXMLParserWrapper createSOAPModelBuilder(InputStream in, String encoding)
Create an object model builder for SOAP that reads a message from the provided input stream, using a given charset encoding. The method will select the appropriateSOAPFactorybased on the namespace URI of the SOAP envelope. It will configure the underlying parser as specified byStAXParserConfiguration.SOAP.- Parameters:
in- the input stream containing the SOAP messageencoding- the charset encoding- Returns:
- the builder
-
-