ZbnfParser.getResultTree()
provides an XML tree already.
The SimpleXmlOutputter
can be used instead.
Example see Zbnf2Xml
@Deprecated
public class ZbnfXmlOutput
extends java.lang.Object
name1/name2
: creates first the xml-element name1 as child, and additional a child element name2.
: adds the content of child into the actual xml-elementname/.
: adds the content to child, same as simple name1
@name
: Writes to the attributename1/@name2
: Create the child name1 and write into the attribute name2 name+
: Expands the content with vishia.xml.ConverterWikistyleTextToXml
name%
: Writes also the parsed syntax as content, if no other content is stored.
Especially for options with no deeper semantic statements like [ a|b|c]
Modifier and Type | Class and Description |
---|---|
private static class |
ZbnfXmlOutput.ConvertWikiStyle
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
(package private) ZbnfXmlOutput.ConvertWikiStyle |
convertWikiStyle
Deprecated.
|
private java.util.TreeMap<java.lang.String,java.lang.String> |
xmlnsList
Deprecated.
|
Constructor and Description |
---|
ZbnfXmlOutput()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private void |
addToXmlNode(ZbnfParseResultItem item,
XmlNode xmlOut)
Deprecated.
adds the content of the parse result item to the xml tree or creates the toplevel element.
|
private void |
addToXmlNodeFinal(java.lang.String sTagAttrName,
ZbnfParseResultItem item,
XmlNode xmlOut)
Deprecated.
adds the content of the parse result item to the xml tree or creates the toplevel element.
|
private java.lang.String |
getValue(ZbnfParseResultItem item,
boolean bGetParsedString)
Deprecated.
|
protected XmlNode |
newChild(java.lang.String sName)
Deprecated.
|
private void |
processComponent(ZbnfParseResultItem item,
XmlNode xmlParent)
Deprecated.
Adds the content of the ZBNF-component item to the xmlParent.
|
(package private) void |
stop()
Deprecated.
It's a debug helper.
|
void |
write(ZbnfParseResultItem zbnfTop,
java.util.TreeMap<java.lang.String,java.lang.String> xmlnsList,
java.io.OutputStreamWriter out)
Deprecated.
Writes the XML Tree.
|
void |
write(ZbnfParser parser,
java.lang.String sFileOut)
Deprecated.
writes the parsers store to an xml file
|
private java.util.TreeMap<java.lang.String,java.lang.String> xmlnsList
ZbnfXmlOutput.ConvertWikiStyle convertWikiStyle
public void write(ZbnfParser parser, java.lang.String sFileOut) throws java.io.FileNotFoundException, XmlException
XmlException
java.io.FileNotFoundException
public void write(ZbnfParseResultItem zbnfTop, java.util.TreeMap<java.lang.String,java.lang.String> xmlnsList, java.io.OutputStreamWriter out) throws java.io.FileNotFoundException, XmlException
zbnfTop
- xmlnsList
- out
- java.io.FileNotFoundException
XmlException
private void addToXmlNode(ZbnfParseResultItem item, XmlNode xmlOut) throws XmlException
item
- The current item. If it is a component, this routine will be called
recursively.xmlOut
- The parent element to be add the content. It may be null, than
the created element will be the toplevel element. In this case the semantic of item
should be contain only a simple identifier to create one element.XmlException
private void addToXmlNodeFinal(java.lang.String sTagAttrName, ZbnfParseResultItem item, XmlNode xmlOut) throws XmlException
item
- The current item. If it is a component, this routine will be called
recursively.xmlOut
- The parent element to be add the content. It may be null, than
the created element will be the toplevel element. In this case the semantic of item
should be contain only a simple identifier to create one element.XmlException
private void processComponent(ZbnfParseResultItem item, XmlNode xmlParent) throws XmlException
[ A| B | C]
is processed here.item
- The componentxmlParent
- The XML-Node to which the components content should be added.XmlException
protected XmlNode newChild(java.lang.String sName)
private java.lang.String getValue(ZbnfParseResultItem item, boolean bGetParsedString)
void stop()