Methods Summary |
---|
public static void | appendCDATA(org.w3c.dom.Element parent, java.lang.String content)Adds a nested CDATA section.
This means
appendCDATA(<a>, "b")
creates
<a><[!CDATA[b]]></a>
Document doc = parent.getOwnerDocument();
CDATASection c = doc.createCDATASection(content);
parent.appendChild(c);
|
public static void | appendCDATAElement(org.w3c.dom.Element parent, java.lang.String name, java.lang.String content)Adds a nested CDATA section in a new child element.
This means
appendCDATAElement(<a>, "b", "c")
creates
<a>
<b><![CDATA[c]]></b>
</a>
Element e = createChildElement(parent, name);
appendCDATA(e, content);
|
public static void | appendText(org.w3c.dom.Element parent, java.lang.String content)Adds nested text.
This means
appendText(<a>, "b")
creates
<a>b</a>
Document doc = parent.getOwnerDocument();
Text t = doc.createTextNode(content);
parent.appendChild(t);
|
public static void | appendTextElement(org.w3c.dom.Element parent, java.lang.String name, java.lang.String content)Adds nested text in a new child element.
This means
appendTextElement(<a>, "b", "c")
creates
<a>
<b>c</b>
</a>
Element e = createChildElement(parent, name);
appendText(e, content);
|
public static org.w3c.dom.Element | createChildElement(org.w3c.dom.Element parent, java.lang.String name)Creates a named Element and appends it to the given element,
returns it.
This means
createChildElement(<a>, "b")
creates
<a>
<b/>
</a>
and returns <b> .
Document doc = parent.getOwnerDocument();
Element e = doc.createElement(name);
parent.appendChild(e);
return e;
|
public static org.w3c.dom.Document | newDocument()Get a new Document instance,
return JAXPUtils.getDocumentBuilder().newDocument();
|