You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/02/15 13:10:20 UTC
svn commit: r507911 -
/lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java
Author: andreas
Date: Thu Feb 15 04:10:19 2007
New Revision: 507911
URL: http://svn.apache.org/viewvc?view=rev&rev=507911
Log:
Added NamespaceHelper.save(OutputStream)
Modified:
lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java
Modified: lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java?view=diff&rev=507911&r1=507910&r2=507911
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java Thu Feb 15 04:10:19 2007
@@ -20,6 +20,8 @@
package org.apache.lenya.xml;
+import java.io.OutputStream;
+
import javax.xml.parsers.ParserConfigurationException;
import org.apache.lenya.util.Assert;
@@ -206,5 +208,17 @@
*/
public Element[] getPrecedingSiblings(Element element, String localName) {
return DocumentHelper.getPrecedingSiblings(element, getNamespaceURI(), localName);
+ }
+
+ /**
+ * Saves the XML.
+ * @param stream The stream to write to.
+ */
+ public void save(OutputStream stream) {
+ try {
+ DocumentHelper.writeDocument(getDocument(), stream);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org