gov.llnl.babel.parsers.xml
public class ParseSymbolXML extends java.lang.Object
ParseSymbolXML
converts an XML document into a SIDL
symbol. Utility function convert
takes either an input
stream or a validated DOM tree and generates a SIDL symbol. Any errors
in format generate a ParseSymbolException
.Constructor and Description |
---|
ParseSymbolXML(org.w3c.dom.Document doc,
Context context)
Create a DOM document to SIDL symbol converter object.
|
ParseSymbolXML(org.xml.sax.InputSource is,
Context context)
Create an XML input stream to SIDL symbol converter object.
|
Modifier and Type | Method and Description |
---|---|
static Symbol |
convert(org.w3c.dom.Document doc,
Context context)
This is a convenience utility function that converts a DOM document
into a SIDL symbol.
|
static Symbol |
convert(org.xml.sax.InputSource is,
Context context)
This is a convenience utility function that converts an XML input
stream into a SIDL symbol.
|
Symbol |
getSymbol()
Return the SIDL symbol for the XML or DOM given in the constructor.
|
public ParseSymbolXML(org.xml.sax.InputSource is, Context context) throws ParseSymbolException
getSymbol
. Any errors will throw a parse symbol
exception.is
- The input stream to use for conversion.ParseSymbolException
- The exception raised if a parsing error is encountered.public ParseSymbolXML(org.w3c.dom.Document doc, Context context) throws ParseSymbolException
getSymbol
.doc
- The DOM document to be converted.ParseSymbolException
- The exception raised if a parsing error is encountered.public static Symbol convert(org.xml.sax.InputSource is, Context context) throws ParseSymbolException
ParseSymbolException
. Since this
method is static, it may be called without explicity creating an
object.is
- The input stream to use for conversion.ParseSymbolException
- The exception raised if a parsing error is encountered.public static Symbol convert(org.w3c.dom.Document doc, Context context) throws ParseSymbolException
ParseSymbolException
. Since this
method is static, it may be called without explicity creating an
object.doc
- The DOM document to be converted.ParseSymbolException
- The exception raised if a parsing error is encountered.public Symbol getSymbol()