public class XmlJzCfgAnalyzer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
XmlJzCfgAnalyzer.XmlStructureData |
(package private) static class |
XmlJzCfgAnalyzer.XmlStructureNode
This class is one node for one element to store the structure of a XML file via
XmlJzReader . |
Modifier and Type | Field and Description |
---|---|
(package private) int |
debugStopLineXmlInp |
(package private) java.util.Map<java.lang.String,java.lang.String> |
nameSpacesAll
The declared name spaces found in all nodes.
|
static java.lang.String |
version
Version, License and History:
2022-06-06 Hartmut: produces the "xmlinput:finish" entry, see
XmlCfg . |
(package private) XmlJzCfgAnalyzer.XmlStructureData |
xmlStructData
The common structure data of the read XML file.
|
(package private) XmlJzCfgAnalyzer.XmlStructureNode |
xmlStructTree
The tree of the structure of the read XML file.
|
Constructor and Description |
---|
XmlJzCfgAnalyzer() |
Modifier and Type | Method and Description |
---|---|
private void |
addWrNode(XmlNode wrCfgXmlNode,
XmlJzCfgAnalyzer.XmlStructureNode structNode,
int recursion)
Adds the node and recursively all sub nodes from
XmlJzCfgAnalyzer.XmlStructureNode
It is invoked after a XML file war read with XmlCfg#newCfgReadStruct() |
static void |
main(java.lang.String[] args)
Reads a XML file and writes its structure as cfg.xml to help creating a config for the XmlJzReader
|
static XmlCfg |
newCfgReadStruct()
Creates the configuration to read any xml file to store its structure especially in
XmlJzCfgAnalyzer.XmlStructureNode . |
private char |
readAttributeOrSubnode(java.lang.String sLine) |
void |
readConfigText(java.io.File fin) |
private void |
readNameSpace(java.lang.String sLine) |
private XmlJzCfgAnalyzer.XmlStructureNode |
readNode(java.io.BufferedReader rd,
java.lang.String sLine1) |
private void |
readRootStructure(java.lang.String sLine) |
void |
readXmlStruct(java.io.File fXmlIn)
Reads any XML file and stores the structure in the
xmlStructTree . |
void |
readXmlStructZip(java.io.File fXmlIn,
java.lang.String pathInZip)
Reads any XML file and stores the structure in the
xmlStructTree . |
void |
setDebugStop(int line)
Only for internal debug.
|
void |
writeCfgTemplate(java.io.File wrCfg)
Writes the config file for the XmlJzReader with config file.
|
void |
writeCfgText(java.io.File fout)
Writes the config file for the XmlJzReader with config file.
|
void |
writeData(java.io.File fout) |
private void |
wrSetAddContentAttrib(XmlJzCfgAnalyzer.XmlStructureNode structNode,
XmlNode wrCfgXmlNode) |
public static final java.lang.String version
XmlCfg
.
GenXmlCfgJavaData
.
int debugStopLineXmlInp
final XmlJzCfgAnalyzer.XmlStructureData xmlStructData
XmlJzCfgAnalyzer.XmlStructureNode xmlStructTree
XmlJzCfgAnalyzer.XmlStructureNode.addElement(String)
.java.util.Map<java.lang.String,java.lang.String> nameSpacesAll
public static void main(java.lang.String[] args)
args
- pathfileIn.xml pathfileOutcfg.xmlpublic static XmlCfg newCfgReadStruct()
XmlJzCfgAnalyzer.XmlStructureNode
.public void setDebugStop(int line)
line
- public void writeCfgTemplate(java.io.File wrCfg)
wrCfg
- the output file.public void writeCfgText(java.io.File fout)
wrCfg
- the output file.public void readConfigText(java.io.File fin)
private void readNameSpace(java.lang.String sLine)
private XmlJzCfgAnalyzer.XmlStructureNode readNode(java.io.BufferedReader rd, java.lang.String sLine1) throws java.io.IOException
java.io.IOException
private char readAttributeOrSubnode(java.lang.String sLine)
private void readRootStructure(java.lang.String sLine)
private void wrSetAddContentAttrib(XmlJzCfgAnalyzer.XmlStructureNode structNode, XmlNode wrCfgXmlNode) throws XmlException
XmlException
private void addWrNode(XmlNode wrCfgXmlNode, XmlJzCfgAnalyzer.XmlStructureNode structNode, int recursion) throws XmlException
XmlJzCfgAnalyzer.XmlStructureNode
It is invoked after a XML file war read with XmlCfg#newCfgReadStruct()
wrCfgXmlNode
- The xml node for output to add.structNode
- The node from the structure of the read XML file,recursion
- decremented, exception on <=0XmlException
- on XML error, IllegalArgumentException on recursion error.public void readXmlStruct(java.io.File fXmlIn) throws java.io.IOException
xmlStructTree
.fXmlIn
- java.io.IOException
public void readXmlStructZip(java.io.File fXmlIn, java.lang.String pathInZip) throws java.io.IOException
xmlStructTree
.fXmlIn
- java.io.IOException
public void writeData(java.io.File fout) throws java.io.IOException
java.io.IOException