source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 15.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:28 NZST 2007 -->
6<TITLE>
7DOMUtil (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.optional.junit.DOMUtil class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="DOMUtil (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeListImpl.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="DOMUtil.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant.taskdefs.optional.junit</FONT>
85<BR>
86Class DOMUtil</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.taskdefs.optional.junit.DOMUtil</B>
90</PRE>
91<HR>
92<DL>
93<DT>public final class <B>DOMUtil</B><DT>extends java.lang.Object</DL>
94
95<P>
96Some utilities that might be useful when manipulating DOM trees.
97<P>
98
99<P>
100<HR>
101
102<P>
103<!-- ======== NESTED CLASS SUMMARY ======== -->
104
105<A NAME="nested_class_summary"><!-- --></A>
106<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
107<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
108<TD COLSPAN=2><FONT SIZE="+2">
109<B>Nested Class Summary</B></FONT></TD>
110</TR>
111<TR BGCOLOR="white" CLASS="TableRowColor">
112<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
113<CODE>static&nbsp;interface</CODE></FONT></TD>
114<TD><CODE><B><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></B></CODE>
115
116<BR>
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filter interface to be applied when iterating over a DOM tree.</TD>
118</TR>
119<TR BGCOLOR="white" CLASS="TableRowColor">
120<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
121<CODE>static&nbsp;class</CODE></FONT></TD>
122<TD><CODE><B><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></B></CODE>
123
124<BR>
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;custom implementation of a nodelist</TD>
126</TR>
127</TABLE>
128&nbsp;
129<!-- =========== FIELD SUMMARY =========== -->
130
131
132<!-- ======== CONSTRUCTOR SUMMARY ======== -->
133
134
135<!-- ========== METHOD SUMMARY =========== -->
136
137<A NAME="method_summary"><!-- --></A>
138<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140<TD COLSPAN=2><FONT SIZE="+2">
141<B>Method Summary</B></FONT></TD>
142</TR>
143<TR BGCOLOR="white" CLASS="TableRowColor">
144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145<CODE>static&nbsp;org.w3c.dom.Element</CODE></FONT></TD>
146<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#getChildByTagName(org.w3c.dom.Node, java.lang.String)">getChildByTagName</A></B>(org.w3c.dom.Node&nbsp;parent,
147 java.lang.String&nbsp;tagname)</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Iterate over the children of a given node and return the first node
151 that has a specific name.</TD>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
156<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#getNodeAttribute(org.w3c.dom.Node, java.lang.String)">getNodeAttribute</A></B>(org.w3c.dom.Node&nbsp;node,
157 java.lang.String&nbsp;name)</CODE>
158
159<BR>
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the attribute value of an element.</TD>
161</TR>
162<TR BGCOLOR="white" CLASS="TableRowColor">
163<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164<CODE>static&nbsp;org.w3c.dom.Node</CODE></FONT></TD>
165<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.html#importNode(org.w3c.dom.Node, org.w3c.dom.Node)">importNode</A></B>(org.w3c.dom.Node&nbsp;parent,
166 org.w3c.dom.Node&nbsp;child)</CODE>
167
168<BR>
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simple tree walker that will clone recursively a node.</TD>
170</TR>
171<TR BGCOLOR="white" CLASS="TableRowColor">
172<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173<CODE>static&nbsp;org.w3c.dom.NodeList</CODE></FONT></TD>
174<TD><CODE><B><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></B>(org.w3c.dom.Node&nbsp;parent,
175 <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>&nbsp;filter,
176 boolean&nbsp;recurse)</CODE>
177
178<BR>
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list a set of node that match a specific filter.</TD>
180</TR>
181</TABLE>
182&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
183<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
184<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
185<TD><B>Methods inherited from class java.lang.Object</B></TD>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
189</TR>
190</TABLE>
191&nbsp;
192<P>
193
194<!-- ============ FIELD DETAIL =========== -->
195
196
197<!-- ========= CONSTRUCTOR DETAIL ======== -->
198
199
200<!-- ============ METHOD DETAIL ========== -->
201
202<A NAME="method_detail"><!-- --></A>
203<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
205<TD COLSPAN=1><FONT SIZE="+2">
206<B>Method Detail</B></FONT></TD>
207</TR>
208</TABLE>
209
210<A NAME="listChildNodes(org.w3c.dom.Node, org.apache.tools.ant.taskdefs.optional.junit.DOMUtil.NodeFilter, boolean)"><!-- --></A><H3>
211listChildNodes</H3>
212<PRE>
213public static org.w3c.dom.NodeList <B>listChildNodes</B>(org.w3c.dom.Node&nbsp;parent,
214 <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>&nbsp;filter,
215 boolean&nbsp;recurse)</PRE>
216<DL>
217<DD>list a set of node that match a specific filter. The list can be made
218 recursively or not.
219<P>
220<DD><DL>
221<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent node to search from<DD><CODE>filter</CODE> - the filter that children should match.<DD><CODE>recurse</CODE> - <tt>true</tt> if you want the list to be made recursively
222 otherwise <tt>false</tt>.</DL>
223</DD>
224</DL>
225<HR>
226
227<A NAME="getNodeAttribute(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
228getNodeAttribute</H3>
229<PRE>
230public static java.lang.String <B>getNodeAttribute</B>(org.w3c.dom.Node&nbsp;node,
231 java.lang.String&nbsp;name)</PRE>
232<DL>
233<DD>return the attribute value of an element.
234<P>
235<DD><DL>
236<DT><B>Parameters:</B><DD><CODE>node</CODE> - the node to get the attribute from.<DD><CODE>name</CODE> - the name of the attribute we are looking for the value.
237<DT><B>Returns:</B><DD>the value of the requested attribute or <tt>null</tt> if the
238 attribute was not found or if <tt>node</tt> is not an <tt>Element</tt>.</DL>
239</DD>
240</DL>
241<HR>
242
243<A NAME="getChildByTagName(org.w3c.dom.Node, java.lang.String)"><!-- --></A><H3>
244getChildByTagName</H3>
245<PRE>
246public static org.w3c.dom.Element <B>getChildByTagName</B>(org.w3c.dom.Node&nbsp;parent,
247 java.lang.String&nbsp;tagname)</PRE>
248<DL>
249<DD>Iterate over the children of a given node and return the first node
250 that has a specific name.
251<P>
252<DD><DL>
253<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the node to search child from. Can be <tt>null</tt>.<DD><CODE>tagname</CODE> - the child name we are looking for. Cannot be <tt>null</tt>.
254<DT><B>Returns:</B><DD>the first child that matches the given name or <tt>null</tt> if
255 the parent is <tt>null</tt> or if a child does not match the
256 given name.</DL>
257</DD>
258</DL>
259<HR>
260
261<A NAME="importNode(org.w3c.dom.Node, org.w3c.dom.Node)"><!-- --></A><H3>
262importNode</H3>
263<PRE>
264public static final org.w3c.dom.Node <B>importNode</B>(org.w3c.dom.Node&nbsp;parent,
265 org.w3c.dom.Node&nbsp;child)</PRE>
266<DL>
267<DD>Simple tree walker that will clone recursively a node. This is to
268 avoid using parser-specific API such as Sun's <tt>changeNodeOwner</tt>
269 when we are dealing with DOM L1 implementations since <tt>cloneNode(boolean)</tt>
270 will not change the owner document.
271 <tt>changeNodeOwner</tt> is much faster and avoid the costly cloning process.
272 <tt>importNode</tt> is in the DOM L2 interface.
273<P>
274<DD><DL>
275<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the node parent to which we should do the import to.<DD><CODE>child</CODE> - the node to clone recursively. Its clone will be
276 appended to <tt>parent</tt>.
277<DT><B>Returns:</B><DD>the cloned node that is appended to <tt>parent</tt></DL>
278</DD>
279</DL>
280<!-- ========= END OF CLASS DATA ========= -->
281<HR>
282
283
284<!-- ======= START OF BOTTOM NAVBAR ====== -->
285<A NAME="navbar_bottom"><!-- --></A>
286<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
287<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
288<TR>
289<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
290<A NAME="navbar_bottom_firstrow"><!-- --></A>
291<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
292 <TR ALIGN="center" VALIGN="top">
293 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
294 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
295 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
296 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
297 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
298 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
299 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
300 </TR>
301</TABLE>
302</TD>
303<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
304</EM>
305</TD>
306</TR>
307
308<TR>
309<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
310&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>PREV CLASS</B></A>&nbsp;
311&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.NodeListImpl.html" title="class in org.apache.tools.ant.taskdefs.optional.junit"><B>NEXT CLASS</B></A></FONT></TD>
312<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
313 <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
314&nbsp;<A HREF="DOMUtil.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
315&nbsp;<SCRIPT type="text/javascript">
316 <!--
317 if(window==top) {
318 document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
319 }
320 //-->
321</SCRIPT>
322<NOSCRIPT>
323 <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
324</NOSCRIPT>
325
326</FONT></TD>
327</TR>
328<TR>
329<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
330 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
331<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
332DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
333</TR>
334</TABLE>
335<A NAME="skip-navbar_bottom"></A>
336<!-- ======== END OF BOTTOM NAVBAR ======= -->
337
338<HR>
339Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
340</BODY>
341</HTML>
Note: See TracBrowser for help on using the repository browser.