- java.lang.Object
-
- com.sun.tools.rngom.digested.DXMLPrinter
-
public class DXMLPrinter extends java.lang.ObjectPrinter of RELAX NG digested model to XML using StAXXMLStreamWriter.- Author:
- Alexey Demakov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDXMLPrinter.DXMLPrinterVisitorprotected classDXMLPrinter.NameClassXMLPrinterVisitorprotected classDXMLPrinter.XMLWriterprotected classDXMLPrinter.XMLWriterException
-
Field Summary
Fields Modifier and Type Field Description protected booleanafterEndprotected com.sun.tools.rngom.digested.DOMPrinterdomPrinterprotected intindentprotected java.lang.StringindentStepprotected DXMLPrinter.NameClassXMLPrinterVisitorncVisitorprotected java.lang.StringnewLineprotected javax.xml.stream.XMLStreamWriteroutprotected DXMLPrinter.DXMLPrinterVisitorvisitor
-
Constructor Summary
Constructors Constructor Description DXMLPrinter(javax.xml.stream.XMLStreamWriter out)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)voidprint(DPattern pattern)Prints XML fragment for the given pattern.voidprint(NameClass nc)Prints XML fragment for the given name class.voidprint(org.w3c.dom.Node node)voidprintDocument(DGrammarPattern grammar)Prints grammar enclosed by start/end document.
-
-
-
Field Detail
-
out
protected javax.xml.stream.XMLStreamWriter out
-
indentStep
protected java.lang.String indentStep
-
newLine
protected java.lang.String newLine
-
indent
protected int indent
-
afterEnd
protected boolean afterEnd
-
visitor
protected DXMLPrinter.DXMLPrinterVisitor visitor
-
ncVisitor
protected DXMLPrinter.NameClassXMLPrinterVisitor ncVisitor
-
domPrinter
protected com.sun.tools.rngom.digested.DOMPrinter domPrinter
-
-
Method Detail
-
printDocument
public void printDocument(DGrammarPattern grammar) throws javax.xml.stream.XMLStreamException
Prints grammar enclosed by start/end document.- Parameters:
grammar-- Throws:
javax.xml.stream.XMLStreamException
-
print
public void print(DPattern pattern) throws javax.xml.stream.XMLStreamException
Prints XML fragment for the given pattern.- Throws:
javax.xml.stream.XMLStreamException
-
print
public void print(NameClass nc) throws javax.xml.stream.XMLStreamException
Prints XML fragment for the given name class.- Throws:
javax.xml.stream.XMLStreamException
-
print
public void print(org.w3c.dom.Node node) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
-