xrel.xml
Class Convert

java.lang.Object
  |
  +--xrel.xml.Convert
All Implemented Interfaces:
XRelParserTreeConstants

public class Convert
extends java.lang.Object
implements XRelParserTreeConstants

Traverses an XML document with DOM and translates it in an internal format tree.

Author:
Fabrizio Bisi

Field Summary
protected static java.lang.String DEFAULT_PARSER_NAME
          Default parser name (Xerces).
protected static ParserWrapper.DocumentInfo fDocumentInfo
          Document information.
 
Fields inherited from interface xrel.parser.XRelParserTreeConstants
JJTAS, JJTCASE, JJTCOMMA, JJTEMPTY, JJTEXPORTTP, JJTIDENTIFIER, JJTIMPORTST, jjtNodeName, JJTOPERATOR, JJTPAR, JJTPROGRAM, JJTSTATEMENTLIST, JJTSTRING, JJTSTRINGLITERAL, JJTSWITCHCASE, JJTTAG, JJTTYPEDECL, JJTVOID
 
Constructor Summary
Convert()
           
 
Method Summary
static SimpleNode toInternalForm(java.lang.String filename)
          The entry point of this class.
protected static SimpleNode xmlSubtree(org.w3c.dom.Node node)
          Traverses the specified node recursively and produces an equivalent internal subtree. This function phisically does the translation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fDocumentInfo

protected static ParserWrapper.DocumentInfo fDocumentInfo
Document information.

DEFAULT_PARSER_NAME

protected static final java.lang.String DEFAULT_PARSER_NAME
Default parser name (Xerces).
Constructor Detail

Convert

public Convert()
Method Detail

toInternalForm

public static SimpleNode toInternalForm(java.lang.String filename)
The entry point of this class. It loads the specified file, parses it with DOM and does the translation itself.
Parameters:
filename - the name to convert
Returns:
the root node of the internal format tree

xmlSubtree

protected static SimpleNode xmlSubtree(org.w3c.dom.Node node)

Traverses the specified node recursively and produces an equivalent internal subtree.

This function phisically does the translation.

Parameters:
node - the DOM node to parse
Returns:
the root SimpleNode