|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.xml.dom.XPBuilder
public class XPBuilder
XML parser utility.
Constructor Summary | |
---|---|
XPBuilder()
|
Method Summary | |
---|---|
static byte[] |
GetDocumentAsByteArray(XPDocument doc)
Returns the marked-up document as a byte array using the encoding of the underlying document if there is one, otherwise default encoding is UTF-8. |
static byte[] |
GetDocumentAsByteArray(XPDocument doc,
java.lang.String encoding)
Returns the marked-up document as a byte array using the encoding specified. |
static java.lang.String |
GetDocumentString(XPDocument doc)
Deprecated. As of XDK Release 2.4.5.0 use GetDocumentAsByteArray(com.plumtree.openfoundation.xml.dom.XPDocument) instead. |
static XPDocument |
LoadDocument(java.lang.String _strFileName)
Loads an XML document from a file amd return an encoded XPDocument object. |
static XPDocument |
LoadDocument(java.lang.String _strFileName,
java.lang.String _strXMLDTD,
boolean _bIgnoreWhitespace)
Loads an XML document from a file using LoadDocumentFromString() method. |
static XPDocument |
LoadDocumentFromByteArray(byte[] byteXML)
Loads an XML document from byte array representation, with preset options to ignore DTD and retain whitespace characters. |
static XPDocument |
LoadDocumentFromByteArray(byte[] byteXML,
java.lang.String _strXMLDTD,
boolean _bIgnoreWhitespace)
Loads an XML document from byte array representation. |
static XPDocument |
LoadDocumentFromString(java.lang.String _strXML)
Loads an XML document from a String representation, with preset options to ignore DTD and retain whitespace characters. |
static XPDocument |
LoadDocumentFromString(java.lang.String _strXML,
java.lang.String _strXMLDTD,
boolean _bIgnoreWhitespace)
Loads an XML document from a String representation. |
static XPDocument |
LoadDocumentFromURI(java.lang.String uri)
Loads an XML file by locating its URI. |
static void |
SaveDocument(java.lang.String fileName,
XPDocument doc)
Saves document to specified file location. |
static void |
SaveDocument(java.lang.String fileName,
XPDocument doc,
boolean bPretty)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPBuilder()
Method Detail |
---|
public static XPDocument LoadDocumentFromString(java.lang.String _strXML, java.lang.String _strXMLDTD, boolean _bIgnoreWhitespace)
_strXML
- - the String representation of the input XML._strXMLDTD
- - DTD file to validate the input XML._bIgnoreWhitespace
- - true to ignore whitespace characters, false if otherwise.
public static XPDocument LoadDocumentFromString(java.lang.String _strXML)
_strXML
- -
the String representation of the XML
public static XPDocument LoadDocumentFromByteArray(byte[] byteXML, java.lang.String _strXMLDTD, boolean _bIgnoreWhitespace)
byteXML
- - the byte array representation of the input XML._strXMLDTD
- - DTD file to validate the input XML._bIgnoreWhitespace
- - true to ignore whitespace characters, false if otherwise.
public static XPDocument LoadDocumentFromByteArray(byte[] byteXML)
byteXML
- - the byte array representation of the input XML.
public static XPDocument LoadDocument(java.lang.String _strFileName, java.lang.String _strXMLDTD, boolean _bIgnoreWhitespace)
LoadDocumentFromString()
method.
_strFileName
- - file of the input XML._strXMLDTD
- - DTD file to validate the input XML._bIgnoreWhitespace
- - true to ignore whitespace characters, false if otherwise.
public static XPDocument LoadDocument(java.lang.String _strFileName)
_strFileName
- -
filename to locate
public static XPDocument LoadDocumentFromURI(java.lang.String uri)
uri
- URI to locate input XML.
public static java.lang.String GetDocumentString(XPDocument doc)
GetDocumentAsByteArray(com.plumtree.openfoundation.xml.dom.XPDocument)
instead.
doc
- -
document to be represented as a string
public static byte[] GetDocumentAsByteArray(XPDocument doc)
doc
- -
document to be represented as a byte array
public static byte[] GetDocumentAsByteArray(XPDocument doc, java.lang.String encoding)
Charset
. Intuitively this might be seen as
ToByteArray() from the document.
doc
- -
document to be represented as a byte arrayencoding
- -
encoding for the byte array
public static void SaveDocument(java.lang.String fileName, XPDocument doc)
fileName
- -
location of file namedoc
- -
document to be savedpublic static void SaveDocument(java.lang.String fileName, XPDocument doc, boolean bPretty)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |