|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.xml.dom.JbbDom
public class JbbDom
This class provides convenience methods to manipulate any XML data with the DOM api (http://www.w3.org/TR/DOM-Level-2-Core/ and http://www.w3.org/TR/DOM-Level-3-Core/)
| Constructor Summary | |
|---|---|
JbbDom()
|
|
| Method Summary | |
|---|---|
boolean |
areEqual(Node node,
Node otherNode)
This tells you whether the two nodes are equal in characteristics. |
boolean |
areSame(Node node,
Node otherNode)
This tells you whether what you are looking at are proxies to the same object or objects that are actually different.Returns false if any of the arguments is null. |
short |
comparePosition(Node node,
Node otherNode)
This method allows you to find out how two nodes are positioned with respect to each other in the document tree. |
Document |
createDocument()
create an empty Document instance |
Document |
createDocumentFromSerializedXml(String zXmlString,
boolean zValidate)
create a Document instance from the given string |
Document |
createDocumentFromSerializedXml(String zXmlString,
boolean zValidate,
String encoding)
create a Document instance from the given string |
Document |
createDocumentFromSerializedXmlStream(File zFile,
boolean zValidate)
create a Document instance from the given file |
Document |
createDocumentFromSerializedXmlStream(File zFile,
boolean zValidate,
String encoding)
create a Document instance from the given file |
Document |
createDocumentFromSerializedXmlStream(InputStream zXmlStream,
boolean zValidate)
create a Document instance from the given stream |
Document |
createDocumentFromSerializedXmlStream(InputStream zXmlStream,
boolean zValidate,
String encoding)
create a Document instance from the given stream |
Element |
createElement(Document zDocument,
String zTagName)
create an element with the given tag name. |
Element |
createElement(Document zDocument,
String zTagName,
boolean zValue)
create an element with an associated text node underneath i.e. |
Element |
createElement(Document zDocument,
String zTagName,
double zValue)
create an element with an associated text node underneath i.e. |
Element |
createElement(Document zDocument,
String zTagName,
float zValue)
create an element with an associated text node underneath i.e. |
Element |
createElement(Document zDocument,
String zTagName,
int zValue)
create an element with an associated text node underneath i.e. |
Element |
createElement(Document zDocument,
String zTagName,
long zValue)
create an element with an associated text node underneath i.e. |
Element |
createElement(Document zDocument,
String zTagName,
String zText)
create an element with the given tag name. |
Element |
createElement(Document zDocument,
String zParentTagName,
String zTagName,
ArrayList<String> zValues)
create an element with the given tag name and attach it to the given element If zValues is null, the method simply creates an element (i.e. |
Element |
createElement(Element zElement,
String zTagName)
create an element with the given tag name and attach it to the given element If zText is null, the method simply creates an element (i.e. |
Element |
createElement(Element zElement,
String zTagName,
boolean zValue)
create an element with the given tag name and attach it to the given element. |
Element |
createElement(Element zElement,
String zTagName,
double zValue)
create an element with the given tag name and attach it to the given element. |
Element |
createElement(Element zElement,
String zTagName,
float zValue)
create an element with the given tag name and attach it to the given element. |
Element |
createElement(Element zElement,
String zTagName,
int zValue)
create an element with the given tag name and attach it to the given element. |
Element |
createElement(Element zElement,
String zTagName,
long zValue)
create an element with the given tag name and attach it to the given element. |
Element |
createElement(Element zElement,
String zTagName,
String zText)
create an element with the given tag name and attach it to the given element If zText is null, the method simply creates an element (i.e. |
Element |
createElement(Element zElement,
String zParentTagName,
String zTagName,
ArrayList<String> zValues)
create an element with the given tag name and attach it to the given element If zValues is null, the method simply creates an element (i.e. |
Element |
createElementCData(Document zDocument,
String zTagName,
String zText)
create an element with the given tag name. |
Element |
createElementCData(Element zElement,
String zTagName,
String zText)
create an element with the given tag name and attach it to the given element If zText is null, the method simply creates an element (i.e. |
Element |
createElementRoot(Document zDocument,
String zTagName)
create a root element with the given tag name in the given document. |
Element |
createElementRoot(Document zDocument,
String zTagName,
String zText)
create a root element with the given tag name in the given document. |
Element |
createElementRootWithAttribute(Document zDocument,
String zTagName,
String zAttributeName,
String zAttributeValue)
create a root element with an attribute i.e. |
String |
getAttributeValue(Document zDocument,
String zTagName,
String zAttributeName)
To retrieve the value of an attribute of a given element (i.e. |
String |
getAttributeValue(Element zElement,
String zAttributeName)
To retrieve the value of an attribute of a given element (i.e. |
boolean |
getAttributeValueAsBool(Document zDocument,
String zTagName,
String zAttributeName)
|
boolean |
getAttributeValueAsBool(Element zElement,
String zAttributeName)
|
double |
getAttributeValueAsDouble(Document zDocument,
String zTagName,
String zAttributeName)
|
double |
getAttributeValueAsDouble(Element zElement,
String zAttributeName)
|
float |
getAttributeValueAsFloat(Document zDocument,
String zTagName,
String zAttributeName)
|
float |
getAttributeValueAsFloat(Element zElement,
String zAttributeName)
|
int |
getAttributeValueAsInt(Document zDocument,
String zTagName,
String zAttributeName)
|
int |
getAttributeValueAsInt(Element zElement,
String zAttributeName)
|
long |
getAttributeValueAsLong(Document zDocument,
String zTagName,
String zAttributeName)
|
long |
getAttributeValueAsLong(Element zElement,
String zAttributeName)
|
Element |
getElement(Document zDocument,
String zTagName)
|
Element |
getElement(Document zDocument,
String zParentTagName,
String zTagName)
|
Element |
getElement(Element zElement,
String zTagName)
|
Element |
getElement(Element zElement,
String zParentTagName,
String zTagName)
|
String |
getElementCDataValue(Document zDocument,
String zTagName)
|
String |
getElementCDataValue(Element zElement)
|
String |
getElementCDataValue(Element zElement,
String zTagName)
|
String |
getElementCDataValue(Element zElement,
String zParentTagName,
String zTagName)
|
ArrayList<Element> |
getElements(Document zDocument,
String zTagName)
|
ArrayList<Element> |
getElements(Document zDocument,
String zParentTagName,
String zTagName)
|
ArrayList<Element> |
getElements(Element element)
|
ArrayList<Element> |
getElements(Element zElement,
String zTagName)
|
ArrayList<Element> |
getElements(Element zElement,
String zParentTagName,
String zTagName)
|
String |
getElementValue(Document zDocument,
String zTagName)
|
String |
getElementValue(Element zElement)
|
String |
getElementValue(Element zElement,
String zTagName)
|
String |
getElementValue(Element zElement,
String zParentTagName,
String zTagName)
|
boolean |
getElementValueAsBool(Document zDocument,
String zTagName)
|
boolean |
getElementValueAsBool(Element zElement,
String zTagName)
|
boolean |
getElementValueAsBool(Element zElement,
String zParentTagName,
String zTagName)
|
double |
getElementValueAsDouble(Document zDocument,
String zTagName)
|
double |
getElementValueAsDouble(Element zElement,
String zTagName)
|
double |
getElementValueAsDouble(Element zElement,
String zParentTagName,
String zTagName)
|
float |
getElementValueAsFloat(Document zDocument,
String zTagName)
|
float |
getElementValueAsFloat(Element zElement,
String zTagName)
|
float |
getElementValueAsFloat(Element zElement,
String zParentTagName,
String zTagName)
|
int |
getElementValueAsInt(Document zDocument,
String zTagName)
|
int |
getElementValueAsInt(Element zElement,
String zTagName)
|
int |
getElementValueAsInt(Element zElement,
String zParentTagName,
String zTagName)
|
long |
getElementValueAsLong(Document zDocument,
String zTagName)
|
long |
getElementValueAsLong(Element zElement,
String zTagName)
|
long |
getElementValueAsLong(Element zElement,
String zParentTagName,
String zTagName)
|
ArrayList<String> |
getElementValues(Document zDocument,
String zTagName)
To retrieve the value of the text elements with the given tag name in the Document (i.e. |
ArrayList<String> |
getElementValues(Document zDocument,
String zParentTagName,
String zTagName)
To retrieve the value of the text elements with the given parent tag name and tag name in the Document (i.e. |
ArrayList<String> |
getElementValues(Element zElement,
String zTagName)
To retrieve the value of the text elements with the given tag name in the given Element (i.e. |
ArrayList<String> |
getElementValues(Element zElement,
String zParentTagName,
String zTagName)
To retrieve the value of the text elements with the given parent tag name and tag name in the Element (i.e. |
void |
importDocument(Document zDocument,
Element zParentElement,
Document zDocumentToImport)
import the given document as a child to the given parent element |
void |
importElement(Document zDocument,
Element zParentElement,
Document zDocumentToImportFrom,
String zTag)
|
void |
importElement(Element zParentElementFromDocument1,
Element zChildElementFromDocument2)
To import a DOM subtree from another document into a document. |
boolean |
isAncestor(Node node,
Node otherNode)
will return true if otherNode is ancestor of node in the document. |
boolean |
isDescendant(Node node,
Node otherNode)
will return true if otherNode is descendant node in the document. |
boolean |
isFollowing(Node node,
Node otherNode)
will return true if otherNode is follows node in the document. |
boolean |
isPreceding(Node node,
Node otherNode)
will return true if otherNode is precedes node in the document. |
static JbbDom |
newInstance()
|
void |
removeElement(Element zElement)
remove the given element from its document |
String |
serialize(Document zDoc)
serialize the given DOM subtree in a string |
String |
serialize(Document doc,
String encoding)
serialize the given DOM document in a String with the given encoding |
String |
serialize(Element zElement)
serialize the given DOM subtree in a string |
String |
serialize(Element zElement,
String encoding)
serialize the given DOM subtree in a string with the given encoding |
void |
serializeToStream(Document document,
OutputStream stream)
serialize the given DOM document in a stream with the default encoding |
void |
serializeToStream(Document document,
OutputStream stream,
String encoding)
serialize the given DOM document in a stream with given encoding |
void |
serializeToStream(Element zElement,
OutputStream zStream)
serialize the given DOM subtree in a stream |
void |
serializeToStream(Element zElement,
OutputStream zStream,
String encoding)
serialize the given DOM subtree in a stream with given encoding |
void |
setAttributeValue(Element zElement,
String zAttrName,
boolean zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setAttributeValue(Element zElement,
String zAttrName,
double zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setAttributeValue(Element zElement,
String zAttrName,
float zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setAttributeValue(Element zElement,
String zAttrName,
int zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setAttributeValue(Element zElement,
String zAttrName,
long zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setAttributeValue(Element zElement,
String zAttrName,
String zAttrValue)
to set (including creation) the value of an attribute for a given element |
void |
setElementValue(Document zDocument,
String zTagName,
String zElementValue)
To set the value of a given text element (i.e. |
void |
setElementValue(Element zElement,
String zTagName,
String zElementValue)
To set the value of a given text element (i.e. |
void |
setElementValues(Document zDocument,
String zParentTagName,
String zChildTagName,
ArrayList<String> zElementValues)
To set the text values of a given element (i.e. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JbbDom()
| Method Detail |
|---|
public static JbbDom newInstance()
public Document createDocument()
throws Exception
Exception - whenever an error occur
public Document createDocumentFromSerializedXml(String zXmlString,
boolean zValidate)
throws Exception
zXmlString - a string containing the linearized Xml documentzValidate - true if the document is to be validated
Exception - whenever an error occur
public Document createDocumentFromSerializedXml(String zXmlString,
boolean zValidate,
String encoding)
throws Exception
zXmlString - a string containing the linearized Xml documentzValidate - true if the document is to be validatedencoding - encoding such as "UTF-8"
Exception - whenever an error occur
public Document createDocumentFromSerializedXmlStream(InputStream zXmlStream,
boolean zValidate)
throws Exception
zXmlStream - an input streamzValidate - true if the document is to be validated
Exception - whenever an error occur
public Document createDocumentFromSerializedXmlStream(InputStream zXmlStream,
boolean zValidate,
String encoding)
throws Exception
zXmlStream - an input streamzValidate - true if the document is to be validatedencoding - such as "UTF-8"
"US-ASCII" Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
"ISO-8859-1" ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
"UTF-8" Eight-bit UCS Transformation Format
"UTF-16BE" Sixteen-bit UCS Transformation Format, big-endian byte order
"UTF-16LE" Sixteen-bit UCS Transformation Format, little-endian byte order
"UTF-16" Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
Exception - whenever an error occur
public Document createDocumentFromSerializedXmlStream(File zFile,
boolean zValidate)
throws Exception
zFile - an input streamzValidate - true if the document is to be validated
Exception - whenever an error occur
public Document createDocumentFromSerializedXmlStream(File zFile,
boolean zValidate,
String encoding)
throws Exception
zFile - an input streamzValidate - true if the document is to be validatedencoding - such as UTF-8
Exception - whenever an error occur
public Element createElement(Document zDocument,
String zTagName)
zDocument - the documentzTagName - the name of the tag
public Element createElement(Document zDocument,
String zTagName,
String zText)
zDocument - the documentzTagName - the name of the tagzText - the text to put between the tags. Use null if you don't want
to create a child text node (Please note that "" is valid and will result in the
creation of a text node)
public Element createElement(Document zDocument,
String zParentTagName,
String zTagName,
ArrayList<String> zValues)
zParentTagName - zTagName - zValues -
public Element createElementCData(Document zDocument,
String zTagName,
String zText)
zDocument - the documentzTagName - the name of the tagzText - the text to put between the tags. Use null if you don't want
to create a child CDATA node (Please note that "" is valid and will result in the
creation of a CDATA node)
public Element createElement(Document zDocument,
String zTagName,
int zValue)
throws Exception
zDocument - the documentzTagName - the name of the tagzValue - the integer value
Exception
public Element createElement(Document zDocument,
String zTagName,
long zValue)
throws Exception
zDocument - the documentzTagName - the name of the tagzValue - the long value
Exception
public Element createElement(Document zDocument,
String zTagName,
float zValue)
throws Exception
zDocument - the documentzTagName - the name of the tagzValue - the float value
Exception
public Element createElement(Document zDocument,
String zTagName,
double zValue)
throws Exception
zDocument - the documentzTagName - the name of the tagzValue - the double value
Exception
public Element createElement(Document zDocument,
String zTagName,
boolean zValue)
zDocument - the documentzTagName - the name of the tagzValue - the boolean value
public Element createElement(Element zElement,
String zTagName,
String zText)
zElement - the elementzTagName - the name of the tagzText - the text to put between the tags. Use null if you don't want
to create a child text node (Please note that "" is valid and will result in the
creation of a text node)
public Element createElement(Element zElement,
String zTagName)
zElement - the elementzTagName - the name of the tag
public Element createElement(Element zElement,
String zParentTagName,
String zTagName,
ArrayList<String> zValues)
zParentTagName - zTagName - zValues -
public Element createElementCData(Element zElement,
String zTagName,
String zText)
zElement - the elementzTagName - the name of the tagzText - the CDATA text to put between the tags. Use null if you don't want
to create a child CDATA node (Please note that "" is valid and will result in the
creation of a CDATA node)
public Element createElement(Element zElement,
String zTagName,
long zValue)
throws Exception
zElement - the elementzTagName - the name of the tagzValue - the long value
Exception
public Element createElement(Element zElement,
String zTagName,
float zValue)
throws Exception
zElement - the elementzTagName - the name of the tagzValue - the float value
Exception
public Element createElement(Element zElement,
String zTagName,
double zValue)
throws Exception
zElement - the elementzTagName - the name of the tagzValue - the long value
Exception
public Element createElement(Element zElement,
String zTagName,
int zValue)
throws Exception
zElement - the elementzTagName - the name of the tagzValue - the integer value
Exception
public Element createElement(Element zElement,
String zTagName,
boolean zValue)
throws Exception
zElement - the elementzTagName - the name of the tagzValue - the boolean value
Exception
public Element createElementRoot(Document zDocument,
String zTagName)
zDocument - the documentzTagName - the name of the tag
public Element createElementRoot(Document zDocument,
String zTagName,
String zText)
zDocument - the documentzTagName - the name of the tagzText - the text to put between the tags (use null if you don't want
to create a child text node)
public Element createElementRootWithAttribute(Document zDocument,
String zTagName,
String zAttributeName,
String zAttributeValue)
zDocument - the documentzTagName - the name of the root tagzAttributeName - the name of the attributezAttributeValue - the value of the attribute
public Element getElement(Document zDocument,
String zTagName)
throws Exception
zDocument - the documentzTagName - the tag name
Exception
public Element getElement(Document zDocument,
String zParentTagName,
String zTagName)
throws Exception
Exception
public Element getElement(Element zElement,
String zTagName)
throws Exception
zElement - the parent elementzTagName - the element tag name to search for (under the given element)
Exception
public Element getElement(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception
public ArrayList<Element> getElements(Document zDocument,
String zTagName)
throws Exception
zDocument - the DOM documentzTagName - the element tag name to search for
Exception
public ArrayList<Element> getElements(Element zElement,
String zTagName)
throws Exception
zElement - the parent elementzTagName - the element tag name to search for (under the given element)
Exception
public ArrayList<Element> getElements(Element element)
throws Exception
zElement - zTagName -
Exception
public ArrayList<Element> getElements(Document zDocument,
String zParentTagName,
String zTagName)
throws Exception
Exception
public ArrayList<Element> getElements(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception
public String getElementValue(Document zDocument,
String zTagName)
throws Exception
zDocument - the DOM documentzTagName - the element tag name to search for
Exception
public String getElementValue(Element zElement,
String zTagName)
throws Exception
Exception
public String getElementValue(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception
public String getElementValue(Element zElement)
throws Exception
Exception
public String getElementCDataValue(Document zDocument,
String zTagName)
throws Exception
zDocument - the DOM documentzTagName - the element tag name to search for
Exception
public String getElementCDataValue(Element zElement,
String zTagName)
throws Exception
Exception
public String getElementCDataValue(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception
public String getElementCDataValue(Element zElement)
throws Exception
Exception
public int getElementValueAsInt(Document zDocument,
String zTagName)
throws Exception
Exception
public int getElementValueAsInt(Element zElement,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public int getElementValueAsInt(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public long getElementValueAsLong(Document zDocument,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public long getElementValueAsLong(Element zElement,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public long getElementValueAsLong(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public float getElementValueAsFloat(Document zDocument,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public float getElementValueAsFloat(Element zElement,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public float getElementValueAsFloat(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public double getElementValueAsDouble(Document zDocument,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public double getElementValueAsDouble(Element zElement,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public double getElementValueAsDouble(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
Exception - if the value is not found or could not be convertedgetElementValue(org.w3c.dom.Document, java.lang.String)
public boolean getElementValueAsBool(Document zDocument,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public boolean getElementValueAsBool(Element zElement,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public boolean getElementValueAsBool(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
ExceptiongetElementValue(org.w3c.dom.Document, java.lang.String)
public ArrayList<String> getElementValues(Document zDocument,
String zTagName)
throws Exception
zTagName - the tag name of the element
Exception
public ArrayList<String> getElementValues(Document zDocument,
String zParentTagName,
String zTagName)
throws Exception
zParentTagName - the tag name of the parent elementzTagName - the tag name of the element
Exception
public ArrayList<String> getElementValues(Element zElement,
String zTagName)
throws Exception
zTagName - the tag name of the element
Exception
public ArrayList<String> getElementValues(Element zElement,
String zParentTagName,
String zTagName)
throws Exception
zParentTagName - the tag name of the parent elementzTagName - the tag name of the element
Exception
public String getAttributeValue(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
zTagName - the tag name of the elementzAttributeName - the attribute name
Exception
public int getAttributeValueAsInt(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public long getAttributeValueAsLong(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public float getAttributeValueAsFloat(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public double getAttributeValueAsDouble(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public boolean getAttributeValueAsBool(Document zDocument,
String zTagName,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public String getAttributeValue(Element zElement,
String zAttributeName)
throws Exception
zElement - the elementzAttributeName - the attribute name
Exception
public int getAttributeValueAsInt(Element zElement,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public long getAttributeValueAsLong(Element zElement,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public float getAttributeValueAsFloat(Element zElement,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public double getAttributeValueAsDouble(Element zElement,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public boolean getAttributeValueAsBool(Element zElement,
String zAttributeName)
throws Exception
ExceptiongetAttributeValue(org.w3c.dom.Document, java.lang.String, java.lang.String)
public void setAttributeValue(Element zElement,
String zAttrName,
String zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setAttributeValue(Element zElement,
String zAttrName,
int zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setAttributeValue(Element zElement,
String zAttrName,
long zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setAttributeValue(Element zElement,
String zAttrName,
boolean zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setAttributeValue(Element zElement,
String zAttrName,
float zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setAttributeValue(Element zElement,
String zAttrName,
double zAttrValue)
throws Exception
zElement - the elementzAttrName - the name of the attribute (please note that there cannot be a space in the name)zAttrValue - the value of the attribute
Exception
public void setElementValue(Document zDocument,
String zTagName,
String zElementValue)
throws Exception
zTagName - the tag name of the elementzElementValue - the value (can be empty but cannot be null)
Exception
public void setElementValues(Document zDocument,
String zParentTagName,
String zChildTagName,
ArrayList<String> zElementValues)
throws Exception
zParentTagName - the tag name of the elementzChildTagName - the tag name of the child text elementzElementValues - the values
Exception
public void setElementValue(Element zElement,
String zTagName,
String zElementValue)
throws Exception
zTagName - the tag name of the elementzElementValue - the value
Exception
public void importDocument(Document zDocument,
Element zParentElement,
Document zDocumentToImport)
throws Exception
Exception - whenever an error occur
public void importElement(Element zParentElementFromDocument1,
Element zChildElementFromDocument2)
throws Exception
zParentElementFromDocument1 - an element in a document: this is the element in the document that will be extended with the
imported subtreezChildElementFromDocument2 - this is the element to import under
the previous "zParentElementFromDocument1" element
Exception
public void importElement(Document zDocument,
Element zParentElement,
Document zDocumentToImportFrom,
String zTag)
throws Exception
zDocument - zParentElement - zDocumentToImportFrom - zTag -
Exception
public String serialize(Element zElement)
throws Exception
zElement - the element
Exception - whenever an error occur
public String serialize(Document zDoc)
throws Exception
zElement - the element
Exception - whenever an error occur
public String serialize(Document doc,
String encoding)
throws Exception
document - the documentencoding - encoding string e.g. "UTF-8", "UTF-16"...
Exception - whenever an error occur
public void serializeToStream(Document document,
OutputStream stream)
throws Exception
Documentt - the documentstream - the output stream to use
Exception - whenever an error occur
public void serializeToStream(Document document,
OutputStream stream,
String encoding)
throws Exception
Documentt - the documentstream - the output stream to useencoding - encoding string e.g. "UTF-8", "UTF-16"...
Exception - whenever an error occur
public void serializeToStream(Element zElement,
OutputStream zStream,
String encoding)
throws Exception
zElement - the elementzStream - the output stream to useencoding - encoding string e.g. "UTF-8", "UTF-16"...
Exception - whenever an error occur
public String serialize(Element zElement,
String encoding)
throws Exception
zElement - the elementencoding - encoding string
Exception - whenever an error occur
public void serializeToStream(Element zElement,
OutputStream zStream)
throws Exception
zElement - the elementzStream - the output stream to use
Exception - whenever an error occur
public void removeElement(Element zElement)
throws Exception
zElement - the element to remove
Exception
public boolean areEqual(Node node,
Node otherNode)
node - otherNode -
public boolean areSame(Node node,
Node otherNode)
node - otherNode -
public short comparePosition(Node node,
Node otherNode)
node - otherNode -
public boolean isDescendant(Node node,
Node otherNode)
node - otherNode -
public boolean isAncestor(Node node,
Node otherNode)
node - otherNode -
public boolean isFollowing(Node node,
Node otherNode)
node - otherNode -
public boolean isPreceding(Node node,
Node otherNode)
node - otherNode -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||