/[classpath]/classpath/gnu/xml/transform/StreamSerializer.java
ViewVC logotype

Diff of /classpath/gnu/xml/transform/StreamSerializer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by gnu_andrew, Thu May 26 17:37:14 2005 UTC revision 1.4 by dog, Thu Jun 30 22:09:07 2005 UTC
# Line 118  public class StreamSerializer Line 118  public class StreamSerializer
118      serialize(node, out, false);      serialize(node, out, false);
119    }    }
120        
121    void serialize(final Node node, final OutputStream out,    void serialize(Node node, final OutputStream out,
122                   boolean convertToCdata)                   boolean convertToCdata)
123      throws IOException      throws IOException
124    {    {
125        while (node != null)
126          {
127            Node next = node.getNextSibling();
128            doSerialize(node, out, convertToCdata);
129            node = next;
130          }
131      }
132    
133      private void doSerialize(final Node node, final OutputStream out,
134                               boolean convertToCdata)
135        throws IOException
136      {
137      if (out == null)      if (out == null)
138        {        {
139          throw new NullPointerException("no output stream");          throw new NullPointerException("no output stream");
140        }        }
141      String value, prefix;      String value, prefix;
142      Node children;      Node children;
     Node next = node.getNextSibling();  
143      String uri = node.getNamespaceURI();      String uri = node.getNamespaceURI();
144      boolean defined = false;      boolean defined = false;
145      short nt = node.getNodeType();      short nt = node.getNodeType();
# Line 466  public class StreamSerializer Line 477  public class StreamSerializer
477        {        {
478          undefine(uri);          undefine(uri);
479        }        }
     if (next != null)  
       {  
         serialize(next, out, convertToCdata);  
       }  
480    }    }
481    
482    boolean isDefined(String uri)    boolean isDefined(String uri)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26