<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (14.0.1) on Sun May 10 16:33:21 CEST 2020 -->
<title>DOMUtils (Apache Ant API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-05-10">
<meta name="description" content="declaration: package: org.apache.tools.ant.util, class: DOMUtils">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<div class="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!--   -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.tools.ant.util</a></div>
<h1 title="Class DOMUtils" class="title">Class DOMUtils</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance">org.apache.tools.ant.util.DOMUtils</div>
</div>
<section class="description">
<hr>
<pre>public class <span class="typeNameLabel">DOMUtils</span>
extends java.lang.Object</pre>
<div class="block">Some utility methods for common tasks when building DOM trees in memory.

 <p>In this documentation <code>&lt;a&gt;</code> means an <code>Element</code> instance with name <code>a</code>.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
<section class="summary">
<ul class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!--   -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="tableTab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendCDATA(org.w3c.dom.Element,java.lang.String)">appendCDATA</a></span>&#8203;(org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;content)</code></th>
<td class="colLast">
<div class="block">Adds a nested CDATA section.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendCDATAElement(org.w3c.dom.Element,java.lang.String,java.lang.String)">appendCDATAElement</a></span>&#8203;(org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name,
java.lang.String&nbsp;content)</code></th>
<td class="colLast">
<div class="block">Adds a nested CDATA section in a new child element.</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendText(org.w3c.dom.Element,java.lang.String)">appendText</a></span>&#8203;(org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;content)</code></th>
<td class="colLast">
<div class="block">Adds nested text.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appendTextElement(org.w3c.dom.Element,java.lang.String,java.lang.String)">appendTextElement</a></span>&#8203;(org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name,
java.lang.String&nbsp;content)</code></th>
<td class="colLast">
<div class="block">Adds nested text in a new child element.</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>static org.w3c.dom.Element</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createChildElement(org.w3c.dom.Element,java.lang.String)">createChildElement</a></span>&#8203;(org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Creates a named Element and appends it to the given element,
 returns it.</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>static org.w3c.dom.Document</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newDocument()">newDocument</a></span>()</code></th>
<td class="colLast">
<div class="block">Get a new Document instance,</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a><code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!--   -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="newDocument()">newDocument</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">org.w3c.dom.Document</span>&nbsp;<span class="memberName">newDocument</span>()</div>
<div class="block">Get a new Document instance,</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the document.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="createChildElement(org.w3c.dom.Element,java.lang.String)">createChildElement</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">org.w3c.dom.Element</span>&nbsp;<span class="memberName">createChildElement</span>&#8203;(<span class="arguments">org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name)</span></div>
<div class="block">Creates a named Element and appends it to the given element,
 returns it.

 <p>This means
 <pre>createChildElement(&lt;a&gt;, "b")</pre>
 creates
 <pre>
 &lt;a&gt;
   &lt;b/&gt;
 &lt;/a&gt;
 </pre>
 and returns <code>&lt;b&gt;</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parent</code> - element that will receive the new element as child.</dd>
<dd><code>name</code> - name of the new element.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new element.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="appendText(org.w3c.dom.Element,java.lang.String)">appendText</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">appendText</span>&#8203;(<span class="arguments">org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;content)</span></div>
<div class="block">Adds nested text.

 <p>This means
 <pre>appendText(&lt;a&gt;, "b")</pre>
 creates
 <pre>
 &lt;a&gt;b&lt;/a&gt;
 </pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parent</code> - element that will receive the new element as child.</dd>
<dd><code>content</code> - text content.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="appendCDATA(org.w3c.dom.Element,java.lang.String)">appendCDATA</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">appendCDATA</span>&#8203;(<span class="arguments">org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;content)</span></div>
<div class="block">Adds a nested CDATA section.

 <p>This means
 <pre>appendCDATA(&lt;a&gt;, "b")</pre>
 creates
 <pre>
 &lt;a&gt;&lt;[!CDATA[b]]&gt;&lt;/a&gt;
 </pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parent</code> - element that will receive the new element as child.</dd>
<dd><code>content</code> - text content.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="appendTextElement(org.w3c.dom.Element,java.lang.String,java.lang.String)">appendTextElement</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">appendTextElement</span>&#8203;(<span class="arguments">org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name,
java.lang.String&nbsp;content)</span></div>
<div class="block">Adds nested text in a new child element.

 <p>This means
 <pre>appendTextElement(&lt;a&gt;, "b", "c")</pre>
 creates
 <pre>
 &lt;a&gt;
   &lt;b&gt;c&lt;/b&gt;
 &lt;/a&gt;
 </pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parent</code> - element that will receive the new element as child.</dd>
<dd><code>name</code> - of the child element.</dd>
<dd><code>content</code> - text content.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="appendCDATAElement(org.w3c.dom.Element,java.lang.String,java.lang.String)">appendCDATAElement</a></h3>
<div class="memberSignature"><span class="modifiers">public static</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">appendCDATAElement</span>&#8203;(<span class="arguments">org.w3c.dom.Element&nbsp;parent,
java.lang.String&nbsp;name,
java.lang.String&nbsp;content)</span></div>
<div class="block">Adds a nested CDATA section in a new child element.

 <p>This means
 <pre>appendCDATAElement(&lt;a&gt;, "b", "c")</pre>
 creates
 <pre>
 &lt;a&gt;
   &lt;b&gt;&lt;![CDATA[c]]&gt;&lt;/b&gt;
 &lt;/a&gt;
 </pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parent</code> - element that will receive the new element as child.</dd>
<dd><code>name</code> - of the child element.</dd>
<dd><code>content</code> - text content.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Ant 1.6.3</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</div>
</div>
</body>
</html>
