public class DomPain
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NS_XML
The Constant NS_XML.
|
static java.lang.String |
NS_XMLNS
The Constant NS_XMLNS.
|
static java.lang.String |
NS_XSI
The Constant NS_XSI.
|
| Constructor and Description |
|---|
DomPain() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(org.w3c.dom.Node parent,
org.w3c.dom.Node child)
Adds the.
|
static void |
attribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
Attribute.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
javax.xml.namespace.QName qname)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
javax.xml.namespace.QName qname,
java.lang.String content)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String namespace)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String namespace,
java.lang.String content)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
javax.xml.namespace.QName qname)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
javax.xml.namespace.QName qname,
java.lang.String content)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Document doc,
java.lang.String local,
java.lang.String ns)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Element parent,
javax.xml.namespace.QName qname)
Element.
|
static org.w3c.dom.Element |
element(org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String ns)
Element.
|
static org.w3c.dom.Element |
firstChild(org.w3c.dom.Node node)
First child.
|
static java.lang.String |
getAttribute(org.w3c.dom.Element elem,
java.lang.String name)
Gets the attribute.
|
static org.w3c.dom.Element |
getChild(org.w3c.dom.Element parent,
java.lang.String tagName,
java.lang.String ns)
Gets the child.
|
static java.util.List<org.w3c.dom.Element> |
getChildElements(org.w3c.dom.Element parent)
Gets the child elements.
|
static java.util.List<org.w3c.dom.Element> |
getChildElements(org.w3c.dom.Element parent,
java.lang.String tagName)
Gets the child elements.
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Element parent,
java.lang.String tagName)
Gets the first child element.
|
static java.lang.String |
getFirstChildElementContent(org.w3c.dom.Element parent,
java.lang.String tagName)
Gets the first child element content.
|
static java.lang.String |
getNamespace(org.w3c.dom.Attr node)
Gets the namespace.
|
static java.lang.String |
getNamespace(org.w3c.dom.Node node,
java.lang.String searchPrefix)
Gets the namespace.
|
static org.w3c.dom.Document |
getOwnerDocument(org.w3c.dom.Node node)
Gets the owner document.
|
static javax.xml.namespace.QName |
getQName(org.w3c.dom.Attr node,
org.w3c.dom.Element root)
Gets the q name.
|
static java.lang.String |
getText(org.w3c.dom.Element element)
Gets the text.
|
static boolean |
isEmpty(java.lang.String str)
Checks if is empty.
|
static org.w3c.dom.Element |
lastChild(org.w3c.dom.Node node)
Last child.
|
static org.w3c.dom.Document |
newDocument()
New document.
|
static org.w3c.dom.Document |
newDocument(java.io.InputStream stream)
New document.
|
static org.w3c.dom.Element |
nextSibling(org.w3c.dom.Node node)
Next sibling.
|
static void |
prettify(org.w3c.dom.Node element,
java.io.OutputStream out)
Prettify.
|
static void |
prettify(org.w3c.dom.Node element,
java.io.Writer out)
Prettify.
|
static javax.xml.transform.stream.StreamResult |
transform(org.w3c.dom.Node doc,
java.io.OutputStream out)
Transform.
|
static javax.xml.transform.stream.StreamResult |
transform(org.w3c.dom.Node doc,
java.io.Writer out)
Transform.
|
static void |
xmlAttribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
Xml attribute.
|
static void |
xmlnsAttribute(org.w3c.dom.Element element,
java.lang.String pref,
java.lang.String uri)
Xmlns attribute.
|
static void |
xsiAttribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
Xsi attribute.
|
public static final java.lang.String NS_XSI
public static final java.lang.String NS_XML
public static final java.lang.String NS_XMLNS
public static org.w3c.dom.Document newDocument()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.public static org.w3c.dom.Document newDocument(java.io.InputStream stream)
throws java.io.IOException
stream - the streamjava.io.IOException - Signals that an I/O exception has occurred.public static javax.xml.transform.stream.StreamResult transform(org.w3c.dom.Node doc,
java.io.OutputStream out)
throws java.io.IOException
doc - the docout - the outjava.io.IOException - Signals that an I/O exception has occurred.public static javax.xml.transform.stream.StreamResult transform(org.w3c.dom.Node doc,
java.io.Writer out)
throws java.io.IOException
doc - the docout - the outjava.io.IOException - Signals that an I/O exception has occurred.public static java.util.List<org.w3c.dom.Element> getChildElements(org.w3c.dom.Element parent)
parent - the parentpublic static java.util.List<org.w3c.dom.Element> getChildElements(org.w3c.dom.Element parent,
java.lang.String tagName)
parent - the parenttagName - the tag namepublic static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element parent,
java.lang.String tagName)
parent - the parenttagName - the tag namepublic static java.lang.String getFirstChildElementContent(org.w3c.dom.Element parent,
java.lang.String tagName)
parent - the parenttagName - the tag namepublic static org.w3c.dom.Element getChild(org.w3c.dom.Element parent,
java.lang.String tagName,
java.lang.String ns)
parent - the parenttagName - the tag namens - the nspublic static java.lang.String getText(org.w3c.dom.Element element)
element - the elementpublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
javax.xml.namespace.QName qname)
doc - the docparent - the parentqname - the qnamepublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String namespace,
java.lang.String content)
doc - the docparent - the parentlocal - the localnamespace - the namespacecontent - the contentpublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
javax.xml.namespace.QName qname,
java.lang.String content)
doc - the docqname - the qnamecontent - the contentpublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
javax.xml.namespace.QName qname,
java.lang.String content)
doc - the docparent - the parentqname - the qnamecontent - the contentpublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String namespace)
doc - the docparent - the parentlocal - the localnamespace - the namespacepublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
javax.xml.namespace.QName qname)
doc - the docqname - the qnamepublic static org.w3c.dom.Element element(org.w3c.dom.Document doc,
java.lang.String local,
java.lang.String ns)
doc - the doclocal - the localns - the nspublic static org.w3c.dom.Element element(org.w3c.dom.Element parent,
javax.xml.namespace.QName qname)
parent - the parentqname - the qnamepublic static org.w3c.dom.Element element(org.w3c.dom.Element parent,
java.lang.String local,
java.lang.String ns)
parent - the parentlocal - the localns - the nspublic static void attribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
element - the elementname - the namevalue - the valuepublic static void xmlAttribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
element - the elementname - the namevalue - the valuepublic static void xmlnsAttribute(org.w3c.dom.Element element,
java.lang.String pref,
java.lang.String uri)
element - the elementpref - the prefuri - the uripublic static void xsiAttribute(org.w3c.dom.Element element,
java.lang.String name,
java.lang.String value)
element - the elementname - the namevalue - the valuepublic static org.w3c.dom.Document getOwnerDocument(org.w3c.dom.Node node)
node - the nodepublic static void add(org.w3c.dom.Node parent,
org.w3c.dom.Node child)
parent - the parentchild - the childpublic static org.w3c.dom.Element firstChild(org.w3c.dom.Node node)
node - the nodepublic static org.w3c.dom.Element lastChild(org.w3c.dom.Node node)
node - the nodepublic static org.w3c.dom.Element nextSibling(org.w3c.dom.Node node)
node - the nodepublic static java.lang.String getAttribute(org.w3c.dom.Element elem,
java.lang.String name)
elem - the elemname - the namepublic static java.lang.String getNamespace(org.w3c.dom.Node node,
java.lang.String searchPrefix)
node - the nodesearchPrefix - the search prefixpublic static java.lang.String getNamespace(org.w3c.dom.Attr node)
node - the nodepublic static javax.xml.namespace.QName getQName(org.w3c.dom.Attr node,
org.w3c.dom.Element root)
node - the noderoot - the rootpublic static boolean isEmpty(java.lang.String str)
str - the strpublic static void prettify(org.w3c.dom.Node element,
java.io.OutputStream out)
throws java.io.IOException
element - the elementout - the outjava.io.IOException - Signals that an I/O exception has occurred.public static void prettify(org.w3c.dom.Node element,
java.io.Writer out)
throws java.io.IOException
element - the elementout - the outjava.io.IOException - Signals that an I/O exception has occurred.