Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\util\DOMElementWriter.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:35:59 EST 2010 --> <TITLE> DOMElementWriter (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.util.DOMElementWriter class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="DOMElementWriter (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/util/DeweyDecimal.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.XmlNamespacePolicy.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/util/DOMElementWriter.html" target="_top"><B>FRAMES</B></A> <A HREF="DOMElementWriter.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant.util</FONT> <BR> Class DOMElementWriter</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.util.DOMElementWriter</B> </PRE> <HR> <DL> <DT><PRE>public class <B>DOMElementWriter</B><DT>extends java.lang.Object</DL> </PRE> <P> Writes a DOM tree to a given Writer. warning: this utility currently does not declare XML Namespaces. <p>Utility class used by <A HREF="../../../../../org/apache/tools/ant/XmlLogger.html" title="class in org.apache.tools.ant"><CODE>XmlLogger</CODE></A> and org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter XMLJUnitResultFormatter}.</p> <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.XmlNamespacePolicy.html" title="class in org.apache.tools.ant.util">DOMElementWriter.XmlNamespacePolicy</A></B></CODE> <BR> Whether namespaces should be ignored for elements and attributes.</TD> </TR> </TABLE> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected java.lang.String[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#knownEntities">knownEntities</A></B></CODE> <BR> Don't try to be too smart but at least recognize the predefined entities.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#DOMElementWriter()">DOMElementWriter</A></B>()</CODE> <BR> Create an element writer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#DOMElementWriter(boolean)">DOMElementWriter</A></B>(boolean xmlDeclaration)</CODE> <BR> Create an element writer XML namespaces will be ignored.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#DOMElementWriter(boolean, org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy)">DOMElementWriter</A></B>(boolean xmlDeclaration, <A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.XmlNamespacePolicy.html" title="class in org.apache.tools.ant.util">DOMElementWriter.XmlNamespacePolicy</A> namespacePolicy)</CODE> <BR> Create an element writer XML namespaces will be ignored.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#closeElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String, boolean)">closeElement</A></B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith, boolean hasChildren)</CODE> <BR> Writes a DOM tree to a stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#encode(java.lang.String)">encode</A></B>(java.lang.String value)</CODE> <BR> Escape <, > & ', " as their entities and drop characters that are illegal in XML documents.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#encodedata(java.lang.String)">encodedata</A></B>(java.lang.String value)</CODE> <BR> Drop characters that are illegal in XML documents.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#isLegalCharacter(char)">isLegalCharacter</A></B>(char c)</CODE> <BR> Is the given character allowed inside an XML document?</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#isReference(java.lang.String)">isReference</A></B>(java.lang.String ent)</CODE> <BR> Is the given argument a character or entity reference?</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#openElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String)">openElement</A></B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith)</CODE> <BR> Writes the opening tag - including all attributes - corresponding to a DOM element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#openElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String, boolean)">openElement</A></B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith, boolean hasChildren)</CODE> <BR> Writes the opening tag - including all attributes - corresponding to a DOM element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#write(org.w3c.dom.Element, java.io.OutputStream)">write</A></B>(org.w3c.dom.Element root, java.io.OutputStream out)</CODE> <BR> Writes a DOM tree to a stream in UTF8 encoding.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#write(org.w3c.dom.Element, java.io.Writer, int, java.lang.String)">write</A></B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith)</CODE> <BR> Writes a DOM tree to a stream.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.html#writeXMLDeclaration(java.io.Writer)">writeXMLDeclaration</A></B>(java.io.Writer wri)</CODE> <BR> Writes the XML declaration if xmlDeclaration is true.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="knownEntities"><!-- --></A><H3> knownEntities</H3> <PRE> protected java.lang.String[] <B>knownEntities</B></PRE> <DL> <DD>Don't try to be too smart but at least recognize the predefined entities. <P> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="DOMElementWriter()"><!-- --></A><H3> DOMElementWriter</H3> <PRE> public <B>DOMElementWriter</B>()</PRE> <DL> <DD>Create an element writer. The ?xml? declaration will be included, namespaces ignored. <P> </DL> <HR> <A NAME="DOMElementWriter(boolean)"><!-- --></A><H3> DOMElementWriter</H3> <PRE> public <B>DOMElementWriter</B>(boolean xmlDeclaration)</PRE> <DL> <DD>Create an element writer XML namespaces will be ignored. <P> <DL> <DT><B>Parameters:</B><DD><CODE>xmlDeclaration</CODE> - flag to indicate whether the ?xml? declaration should be included.<DT><B>Since:</B></DT> <DD>Ant1.7</DD> </DL> </DL> <HR> <A NAME="DOMElementWriter(boolean, org.apache.tools.ant.util.DOMElementWriter.XmlNamespacePolicy)"><!-- --></A><H3> DOMElementWriter</H3> <PRE> public <B>DOMElementWriter</B>(boolean xmlDeclaration, <A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.XmlNamespacePolicy.html" title="class in org.apache.tools.ant.util">DOMElementWriter.XmlNamespacePolicy</A> namespacePolicy)</PRE> <DL> <DD>Create an element writer XML namespaces will be ignored. <P> <DL> <DT><B>Parameters:</B><DD><CODE>xmlDeclaration</CODE> - flag to indicate whether the ?xml? declaration should be included.<DD><CODE>namespacePolicy</CODE> - the policy to use.<DT><B>Since:</B></DT> <DD>Ant1.7</DD> </DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="write(org.w3c.dom.Element, java.io.OutputStream)"><!-- --></A><H3> write</H3> <PRE> public void <B>write</B>(org.w3c.dom.Element root, java.io.OutputStream out) throws java.io.IOException</PRE> <DL> <DD>Writes a DOM tree to a stream in UTF8 encoding. Note that it prepends the <?xml version='1.0' encoding='UTF-8'?> if the xmlDeclaration field is true. The indent number is set to 0 and a 2-space indent. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>root</CODE> - the root element of the DOM tree.<DD><CODE>out</CODE> - the outputstream to write to. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if an error happens while writing to the stream.</DL> </DD> </DL> <HR> <A NAME="writeXMLDeclaration(java.io.Writer)"><!-- --></A><H3> writeXMLDeclaration</H3> <PRE> public void <B>writeXMLDeclaration</B>(java.io.Writer wri) throws java.io.IOException</PRE> <DL> <DD>Writes the XML declaration if xmlDeclaration is true. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>wri</CODE> - the writer to write to. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if there is an error.<DT><B>Since:</B></DT> <DD>Ant 1.7.0</DD> </DL> </DD> </DL> <HR> <A NAME="write(org.w3c.dom.Element, java.io.Writer, int, java.lang.String)"><!-- --></A><H3> write</H3> <PRE> public void <B>write</B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith) throws java.io.IOException</PRE> <DL> <DD>Writes a DOM tree to a stream. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - the Root DOM element of the tree<DD><CODE>out</CODE> - where to send the output<DD><CODE>indent</CODE> - number of<DD><CODE>indentWith</CODE> - string that should be used to indent the corresponding tag. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if an error happens while writing to the stream.</DL> </DD> </DL> <HR> <A NAME="openElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String)"><!-- --></A><H3> openElement</H3> <PRE> public void <B>openElement</B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith) throws java.io.IOException</PRE> <DL> <DD>Writes the opening tag - including all attributes - corresponding to a DOM element. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - the DOM element to write<DD><CODE>out</CODE> - where to send the output<DD><CODE>indent</CODE> - number of<DD><CODE>indentWith</CODE> - string that should be used to indent the corresponding tag. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if an error happens while writing to the stream.</DL> </DD> </DL> <HR> <A NAME="openElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String, boolean)"><!-- --></A><H3> openElement</H3> <PRE> public void <B>openElement</B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith, boolean hasChildren) throws java.io.IOException</PRE> <DL> <DD>Writes the opening tag - including all attributes - corresponding to a DOM element. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - the DOM element to write<DD><CODE>out</CODE> - where to send the output<DD><CODE>indent</CODE> - number of<DD><CODE>indentWith</CODE> - string that should be used to indent the corresponding tag.<DD><CODE>hasChildren</CODE> - whether this element has children. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if an error happens while writing to the stream.<DT><B>Since:</B></DT> <DD>Ant 1.7</DD> </DL> </DD> </DL> <HR> <A NAME="closeElement(org.w3c.dom.Element, java.io.Writer, int, java.lang.String, boolean)"><!-- --></A><H3> closeElement</H3> <PRE> public void <B>closeElement</B>(org.w3c.dom.Element element, java.io.Writer out, int indent, java.lang.String indentWith, boolean hasChildren) throws java.io.IOException</PRE> <DL> <DD>Writes a DOM tree to a stream. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - the Root DOM element of the tree<DD><CODE>out</CODE> - where to send the output<DD><CODE>indent</CODE> - number of<DD><CODE>indentWith</CODE> - string that should be used to indent the corresponding tag.<DD><CODE>hasChildren</CODE> - if true indent. <DT><B>Throws:</B> <DD><CODE>java.io.IOException</CODE> - if an error happens while writing to the stream.</DL> </DD> </DL> <HR> <A NAME="encode(java.lang.String)"><!-- --></A><H3> encode</H3> <PRE> public java.lang.String <B>encode</B>(java.lang.String value)</PRE> <DL> <DD>Escape <, > & ', " as their entities and drop characters that are illegal in XML documents. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the string to encode. <DT><B>Returns:</B><DD>the encoded string.</DL> </DD> </DL> <HR> <A NAME="encodedata(java.lang.String)"><!-- --></A><H3> encodedata</H3> <PRE> public java.lang.String <B>encodedata</B>(java.lang.String value)</PRE> <DL> <DD>Drop characters that are illegal in XML documents. <p>Also ensure that we are not including an <code>]]></code> marker by replacing that sequence with <code>&#x5d;&#x5d;&gt;</code>.</p> <p>See XML 1.0 2.2 <a href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets"> http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a> and 2.7 <a href="http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect">http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect</a>.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to be encoded. <DT><B>Returns:</B><DD>the encoded value.</DL> </DD> </DL> <HR> <A NAME="isReference(java.lang.String)"><!-- --></A><H3> isReference</H3> <PRE> public boolean <B>isReference</B>(java.lang.String ent)</PRE> <DL> <DD>Is the given argument a character or entity reference? <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ent</CODE> - the value to be checked. <DT><B>Returns:</B><DD>true if it is an entity.</DL> </DD> </DL> <HR> <A NAME="isLegalCharacter(char)"><!-- --></A><H3> isLegalCharacter</H3> <PRE> public boolean <B>isLegalCharacter</B>(char c)</PRE> <DL> <DD>Is the given character allowed inside an XML document? <p>See XML 1.0 2.2 <a href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets"> http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a>.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>c</CODE> - the character to test. <DT><B>Returns:</B><DD>true if the character is allowed.<DT><B>Since:</B></DT> <DD>1.10, Ant 1.5</DD> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/tools/ant/util/DeweyDecimal.html" title="class in org.apache.tools.ant.util"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/tools/ant/util/DOMElementWriter.XmlNamespacePolicy.html" title="class in org.apache.tools.ant.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/tools/ant/util/DOMElementWriter.html" target="_top"><B>FRAMES</B></A> <A HREF="DOMElementWriter.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de