|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ecs.factory.DOMFactory
public class DOMFactory
Field Summary | |
---|---|
private java.io.ByteArrayOutputStream |
outStream
|
Constructor Summary | |
---|---|
DOMFactory()
Default Constructor. |
Method Summary | |
---|---|
org.w3c.dom.Document |
createDOM()
Creates a Document from the root element of the XML Stream. |
java.io.OutputStream |
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, toString, wait, wait, wait |
Field Detail |
---|
private java.io.ByteArrayOutputStream outStream
Constructor Detail |
---|
public DOMFactory()
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 |
---|
public java.io.OutputStream getOutputStream()
public org.w3c.dom.Document createDOM()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |