| java.lang.Object org.openharmonise.commons.xml.XMLDocument
All known Subclasses: org.openharmonise.rm.publishing.HarmoniseOutput, org.openharmonise.rm.publishing.State,
XMLDocument | public class XMLDocument implements Document(Code) | | This class is a Proxy implementation of the org.w3c.dom.Document interface
which allows a single class to wrap up whatever implementation of the interface is
currently used with in the Harmonise framework, and adding a couple of utility methods.
author: Michael Bell version: $Revision: 1.2 $ |
Method Summary | |
public Node | appendChild(Node arg0) | public Node | cloneNode(boolean arg0) | public static boolean | compareElement(Element origEl, Element compEl) Compares the two given elements and returns true if they match. | public void | copyChildren(Element parent_destination, Element parent_source) Copies XML child nodes from parent source to parent_destination element in this document. | public void | copyChildren(Element parent_destination, Element parent_source, Vector ignoreTags) Copies XML child nodes from parent source to parent_destination element. | public Node | copyNode(Node originalEl) Returns a copy of the given node, copied to this document. | public Attr | createAttribute(String arg0) | public Attr | createAttributeNS(String arg0, String arg1) | public CDATASection | createCDATASection(String arg0) | public Comment | createComment(String arg0) | public DocumentFragment | createDocumentFragment() | public Element | createElement(String arg0) | public Element | createElementNS(String arg0, String arg1) | public EntityReference | createEntityReference(String arg0) | public ProcessingInstruction | createProcessingInstruction(String arg0, String arg1) | public Text | createTextNode(String arg0) | public static String | elementInfo(Element element) Convenience method to display top form element, for logging purposes only. | public boolean | equals(Object arg0) | public static Element | findElement(Element sourceEl, Element toFindEl) Finds element in one element which matches the another element. | public NamedNodeMap | getAttributes() | public NodeList | getChildNodes() | public static String | getChildTextNodeValue(Element xmlElement) Returns the String value of the Text Node
which is a child of the given element. | public DocumentType | getDoctype() | public Element | getDocumentElement() | public Element | getElementById(String arg0) | public NodeList | getElementsByTagName(String arg0) | public NodeList | getElementsByTagNameNS(String arg0, String arg1) | public Node | getFirstChild() | public DOMImplementation | getImplementation() | public Node | getLastChild() | public String | getLocalName() | public String | getNamespaceURI() | public Node | getNextSibling() | public String | getNodeName() | public short | getNodeType() | public String | getNodeValue() | public Document | getOwnerDocument() | public Node | getParentNode() | public String | getPrefix() | public Node | getPreviousSibling() | public static org.w3c.dom.Document | getXMLDocumentFromString(String sXML) Returns org.w3c.dom.Document from the given String . | public boolean | hasAttributes() | public boolean | hasChildNodes() | public int | hashCode() | public Node | importNode(Node arg0, boolean arg1) | public Node | insertBefore(Node arg0, Node arg1) | public boolean | isSupported(String arg0, String arg1) | public void | normalize() | public static String | printNode(Node node) Takes XML node and prints to String. | public Node | removeChild(Node arg0) | public Node | replaceChild(Node arg0, Node arg1) | public void | setNodeValue(String arg0) | public void | setPrefix(String arg0) | public String | toString() |
XMLDocument | public XMLDocument()(Code) | | Constructs an XMLDocument from a w3c Document.
Parameters: document - - The document to use |
XMLDocument | public XMLDocument(org.w3c.dom.Document document)(Code) | | Constructs an XMLDocument from a w3c Document.
Parameters: document - - The document to use |
cloneNode | public Node cloneNode(boolean arg0)(Code) | | |
compareElement | public static boolean compareElement(Element origEl, Element compEl)(Code) | | Compares the two given elements and returns true if they match.
Parameters: origEl - Parameters: compEl - |
copyChildren | public void copyChildren(Element parent_destination, Element parent_source)(Code) | | Copies XML child nodes from parent source to parent_destination element in this document.
Parameters: parent_destination - Element to have child nodes copied to Parameters: parent_source - Element with child nodes to be copied Parameters: destination_xml_document - XML document containingparent_destination |
copyChildren | public void copyChildren(Element parent_destination, Element parent_source, Vector ignoreTags)(Code) | | Copies XML child nodes from parent source to parent_destination element.
Parameters: parent_destination - Element to have child nodes copied to Parameters: parent_source - Element with child nodes to be copied Parameters: destination_xml_document - XML document containingparent_destination Parameters: ignoreTags - List of node names to be ignored (not copied over) |
copyNode | public Node copyNode(Node originalEl)(Code) | | Returns a copy of the given node, copied to this document.
Parameters: originalEl - Node to be copied |
elementInfo | public static String elementInfo(Element element)(Code) | | Convenience method to display top form element, for logging purposes only.
Parameters: element - The element to display info for |
findElement | public static Element findElement(Element sourceEl, Element toFindEl)(Code) | | Finds element in one element which matches the another element.
Parameters: el - Element to match Parameters: state - XML representation Matching Element found |
getChildTextNodeValue | public static String getChildTextNodeValue(Element xmlElement)(Code) | | Returns the String value of the Text Node
which is a child of the given element.
Parameters: xmlElement - |
getNodeType | public short getNodeType()(Code) | | |
getPreviousSibling | public Node getPreviousSibling()(Code) | | |
hasAttributes | public boolean hasAttributes()(Code) | | |
hasChildNodes | public boolean hasChildNodes()(Code) | | |
hashCode | public int hashCode()(Code) | | |
normalize | public void normalize()(Code) | | |
printNode | public static String printNode(Node node)(Code) | | Takes XML node and prints to String.
Parameters: node - Element to print to String XML node as String |
|
|