Author: natalia
Date: Wed Mar 12 18:32:03 2008
New Revision: 636598
URL: http://svn.apache.org/viewvc?rev=636598&view=rev
Log:
Switch to new XML escaping utility, javadoc fixes
Modified:
xml/xindice/trunk/java/src/org/apache/xindice/xml/TextWriter.java
Modified: xml/xindice/trunk/java/src/org/apache/xindice/xml/TextWriter.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/xml/TextWriter.java?rev=636598&r1=636597&r2=636598&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/xml/TextWriter.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/xml/TextWriter.java Wed Mar 12 18:32:03 2008
@@ -21,7 +21,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.xindice.util.StringUtilities;
+import org.apache.xindice.util.XMLUtilities;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -61,6 +61,7 @@
* write writes the node to the writer as text.
*
* @param writer The Writer to write to
+ * @throws IOException If input/output exception occured
*/
public void write(Writer writer) throws IOException {
write(node, writer);
@@ -70,6 +71,7 @@
* write writes the node to the OutputStream as text.
*
* @param output The OutputStream to write to
+ * @throws IOException If input/output exception occured
*/
public void write(OutputStream output) throws IOException {
write(node, output);
@@ -140,7 +142,7 @@
Attr att = (Attr) node;
writer.write(att.getName());
writer.write("=\"");
- writer.write(StringUtilities.escapeXml(att.getValue()));
+ writer.write(XMLUtilities.escape(att.getValue()));
writer.write("\"");
break;
@@ -175,7 +177,7 @@
break;
case Node.TEXT_NODE:
- writer.write(StringUtilities.escapeXml(node.getNodeValue()));
+ writer.write(XMLUtilities.escape(node.getNodeValue()));
break;
case Node.CDATA_SECTION_NODE:
@@ -210,6 +212,7 @@
*
* @param node The Node to write
* @param writer The Writer to write to
+ * @throws IOException If input/output exception occured
*/
public static void write(Node node, Writer writer) throws IOException {
BufferedWriter buf = new BufferedWriter(writer, 4096);
@@ -222,6 +225,7 @@
*
* @param node The Node to write
* @param output The OutputStream to write to
+ * @throws IOException If input/output exception occured
*/
public static void write(Node node, OutputStream output) throws IOException {
OutputStreamWriter o = new OutputStreamWriter(output, "utf-8");
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.