com.reverseXSL
Class Parse
java.lang.Object
com.reverseXSL.Parse
public class Parse
- extends java.lang.Object
The stand-alone command-line Parser is quite useful in development-cycle automation.
This is a wrapper class over the
reverseXSL Parser API.
Usage (assuming ReverseXSL.jar on the CLASSPATH):
java com.reverseXSL.Parse myDefinitionFile
Dumps a sample XML message matching the definition
or :
java com.reverseXSL.Parse myDefinitionFile myInputMessageFile
Executes the Parser from the command line and outputs a dump of the parser state
followed by the generated XML.
or :
java com.reverseXSL.Parse myDefinitionFile myTOKEN
Applies the definition onto the first #myTOKEN=; found inside the DEF file (this
mode is used with Stylus Studio customs tools and tokens like ONE, TWO, THREE)
or :
java com.reverseXSL.Parse myDefinitionFile myInputMessageFile <MaxFatalExceptions>
<MaxExceptions> <true|false>
where the last argument tells to removeNonRepeatableNilOptionalElements
Note that the XML message is written on stdout
whereas the parser state dump is written on stderr.
It is then easy to capture just the XML output by calling:
java com.reverseXSL.Parse myDefinitionFile myInputMessageFile >>out.xml
Constructor Summary |
Parse()
|
Method Summary |
static void |
main(java.lang.String[] args)
Command-line tool entry point. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parse
public Parse()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Command-line tool entry point.
- Parameters:
args
- see Parse
javadoc
- Throws:
java.lang.Exception