????
| Current Path : /opt/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/ |
| Current File : //opt/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:53 CEST 2012 -->
<title>DOMUtil (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DOMUtil (Apache Ant API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.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">
<ul class="navList">
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/Constants.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeFilter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html" target="_top">Frames</a></li>
<li><a href="DOMUtil.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.ant.taskdefs.optional.junit</div>
<h2 title="Class DOMUtil" class="title">Class DOMUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.taskdefs.optional.junit.DOMUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">DOMUtil</span>
extends java.lang.Object</pre>
<div class="block">Some utilities that might be useful when manipulating DOM trees.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeFilter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit">DOMUtil.NodeFilter</a></strong></code>
<div class="block">Filter interface to be applied when iterating over a DOM tree.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeListImpl.html" title="class in org.apache.tools.ant.taskdefs.optional.junit">DOMUtil.NodeListImpl</a></strong></code>
<div class="block">custom implementation of a nodelist</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static org.w3c.dom.Element</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#getChildByTagName(org.w3c.dom.Node, java.lang.String)">getChildByTagName</a></strong>(org.w3c.dom.Node parent,
java.lang.String tagname)</code>
<div class="block">Iterate over the children of a given node and return the first node
that has a specific name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#getNodeAttribute(org.w3c.dom.Node, java.lang.String)">getNodeAttribute</a></strong>(org.w3c.dom.Node node,
java.lang.String name)</code>
<div class="block">return the attribute value of an element.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static org.w3c.dom.Node</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#importNode(org.w3c.dom.Node, org.w3c.dom.Node)">importNode</a></strong>(org.w3c.dom.Node parent,
org.w3c.dom.Node child)</code>
<div class="block">Simple tree walker that will clone recursively a node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static org.w3c.dom.NodeList</code></td>
<td class="colLast"><code><strong><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#listChildNodes(org.w3c.dom.Node, org.apache.tools.ant.taskdefs.optional.junit.DOMUtil.NodeFilter, boolean)">listChildNodes</a></strong>(org.w3c.dom.Node parent,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeFilter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit">DOMUtil.NodeFilter</a> filter,
boolean recurse)</code>
<div class="block">list a set of node that match a specific filter.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="listChildNodes(org.w3c.dom.Node, org.apache.tools.ant.taskdefs.optional.junit.DOMUtil.NodeFilter, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listChildNodes</h4>
<pre>public static org.w3c.dom.NodeList listChildNodes(org.w3c.dom.Node parent,
<a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeFilter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit">DOMUtil.NodeFilter</a> filter,
boolean recurse)</pre>
<div class="block">list a set of node that match a specific filter. The list can be made
recursively or not.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parent</code> - the parent node to search from</dd><dd><code>filter</code> - the filter that children should match.</dd><dd><code>recurse</code> - <tt>true</tt> if you want the list to be made recursively
otherwise <tt>false</tt>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the node list that matches the filter.</dd></dl>
</li>
</ul>
<a name="getNodeAttribute(org.w3c.dom.Node, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNodeAttribute</h4>
<pre>public static java.lang.String getNodeAttribute(org.w3c.dom.Node node,
java.lang.String name)</pre>
<div class="block">return the attribute value of an element.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node to get the attribute from.</dd><dd><code>name</code> - the name of the attribute we are looking for the value.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value of the requested attribute or <tt>null</tt> if the
attribute was not found or if <tt>node</tt> is not an <tt>Element</tt>.</dd></dl>
</li>
</ul>
<a name="getChildByTagName(org.w3c.dom.Node, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChildByTagName</h4>
<pre>public static org.w3c.dom.Element getChildByTagName(org.w3c.dom.Node parent,
java.lang.String tagname)</pre>
<div class="block">Iterate over the children of a given node and return the first node
that has a specific name.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parent</code> - the node to search child from. Can be <tt>null</tt>.</dd><dd><code>tagname</code> - the child name we are looking for. Cannot be <tt>null</tt>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the first child that matches the given name or <tt>null</tt> if
the parent is <tt>null</tt> or if a child does not match the
given name.</dd></dl>
</li>
</ul>
<a name="importNode(org.w3c.dom.Node, org.w3c.dom.Node)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>importNode</h4>
<pre>public static org.w3c.dom.Node importNode(org.w3c.dom.Node parent,
org.w3c.dom.Node child)</pre>
<div class="block">Simple tree walker that will clone recursively a node. This is to
avoid using parser-specific API such as Sun's <tt>changeNodeOwner</tt>
when we are dealing with DOM L1 implementations since <tt>cloneNode(boolean)</tt>
will not change the owner document.
<tt>changeNodeOwner</tt> is much faster and avoid the costly cloning process.
<tt>importNode</tt> is in the DOM L2 interface.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parent</code> - the node parent to which we should do the import to.</dd><dd><code>child</code> - the node to clone recursively. Its clone will be
appended to <tt>parent</tt>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the cloned node that is appended to <tt>parent</tt></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.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">
<ul class="navList">
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/Constants.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeFilter.html" title="interface in org.apache.tools.ant.taskdefs.optional.junit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html" target="_top">Frames</a></li>
<li><a href="DOMUtil.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>