|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.neoworks.util.DOMUtils
DOM Utility functions
| Method Summary | |
static java.lang.String |
DOM2String(org.w3c.dom.Node node)
Converts the passed DOM Node into a String
object. |
static java.lang.String |
DOM2String(org.w3c.dom.Node node,
boolean quiet)
Converts the passed DOM Node into a String
object. |
static java.lang.String |
DOM2String(org.w3c.dom.NodeList nodelist)
Converts the passed DOM NodeList into a String
object. |
static java.lang.String |
DOM2String(org.w3c.dom.Node node,
org.apache.xml.serialize.OutputFormat outputFormat)
Converts the passed DOM Node into a String
object. |
static org.w3c.dom.DocumentFragment |
moveNodes2DocumentFragment(org.w3c.dom.Document factory,
org.w3c.dom.NodeList nodeList)
Moves the nodes from a NodeList into a new DocumentFragment |
static void |
ReplaceElement(org.w3c.dom.Element oldElement,
org.w3c.dom.Element newElement)
Replace an element in the DOM with a different specified element |
static void |
ReplaceElement(org.w3c.dom.Element oldElement,
org.w3c.dom.NodeList newElements)
Replace an element in the DOM with a list of elements |
static org.w3c.dom.Document |
string2DOM(java.lang.String xmldoc)
Converts the passed String object into a DOM Document |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static org.w3c.dom.Document string2DOM(java.lang.String xmldoc)
throws java.lang.Exception
String object into a DOM Document
xmldoc - The string to convert to a DOM
java.lang.Exception - If the String could not be parsed into a DOMpublic static java.lang.String DOM2String(org.w3c.dom.Node node)
Node into a String
object. This function currently supports Element,
Node, DocumentFragment, Document
and Attribute types.
Throws a RuntimeException if the Node type passed is not supported.
node - An XML Node to be converted into a string
public static java.lang.String DOM2String(org.w3c.dom.NodeList nodelist)
NodeList into a String
object. This function currently supports Element,
Node, DocumentFragment, Document
and Attribute types.
Throws a RuntimeException if the Node type passed is not supported.
nodelist - An XML NodeList to be converted into a string
public static java.lang.String DOM2String(org.w3c.dom.Node node,
boolean quiet)
Node into a String
object. This function currently supports Element,
Node, DocumentFragment, Document
and Attribute types.
Throws a RuntimeException if the Node type passed is not supported
node - An XML Node to be converted into a stringquiet - If true suppress all XML headers and disable line wrapping
public static java.lang.String DOM2String(org.w3c.dom.Node node,
org.apache.xml.serialize.OutputFormat outputFormat)
Node into a String
object. This function currently supports Element,
Node, DocumentFragment, Document
and Attribute types.
Throws a RuntimeException if the Node type passed is not supported
node - An XML Node to be converted into a stringoutputFormat - The OutputFormat to use to convert the Node to a String.
public static void ReplaceElement(org.w3c.dom.Element oldElement,
org.w3c.dom.Element newElement)
throws org.w3c.dom.DOMException
oldElement - The element to replacenewElement - the element to put in its place
org.w3c.dom.DOMException - on error
public static void ReplaceElement(org.w3c.dom.Element oldElement,
org.w3c.dom.NodeList newElements)
throws org.w3c.dom.DOMException
oldElement - The element to replacenewElements - The element to put in its place
org.w3c.dom.DOMException - on error
public static org.w3c.dom.DocumentFragment moveNodes2DocumentFragment(org.w3c.dom.Document factory,
org.w3c.dom.NodeList nodeList)
throws java.lang.Exception
factory - the factory to use to create the DocumentFragmentnodeList - The Nodes to add to the DocumentFragment
java.lang.Exception - on error
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||