org.apache.ecs.factory
Class DOMFactory

java.lang.Object
  |
  +--org.apache.ecs.factory.DOMFactory

public class DOMFactory
extends java.lang.Object


Field Summary
private  java.io.PipedOutputStream outStream
           
private  java.io.PipedInputStream pis
           
 
Constructor Summary
DOMFactory()
          Default Constructor.
 
Method Summary
(package private)  void ()
           
 org.w3c.dom.Document createDOM()
          Creates a Document from the root element of the XML Stream.
 java.io.PipedOutputStream getOutputStream()
          Gets the output stream for the ecs element to write to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

outStream

private java.io.PipedOutputStream outStream

pis

private java.io.PipedInputStream pis
Constructor Detail

DOMFactory

public DOMFactory()
Default Constructor. Here is a simple example on how to use this class.
PI p = new PI();
p.setVersion(1.0);
XML x = new XML("root",true);
XML x1 = new XML("page",true);
XML x2 = new XML("paragraph");
XML x3 = new XML("paragraph");
x2.addElement("This is the first Paragraph");
x3.addElement("This is the second Paragraph");
x.addElement(x1.addElement(x2).addElement(x3));
p.addElement(x);
DOMFactory d = new DOMFactory();
p.output(d.getOutputStream());

Document doc = d.createDOM();
Method Detail

void ()
Overrides:
in class java.lang.Object

getOutputStream

public java.io.PipedOutputStream getOutputStream()
Gets the output stream for the ecs element to write to.

createDOM

public org.w3c.dom.Document createDOM()
Creates a Document from the root element of the XML Stream.


Copyright © 1999-2000 Apache Software Foundation. All Rights Reserved.