|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.ecs.factory.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 |
|
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |