org.mindswap.xmlparser
Class XMLParser

java.lang.Object
  |
  +--org.mindswap.xmlparser.XMLParser
All Implemented Interfaces:
RDFConsts, XMLConsts
Direct Known Subclasses:
RDFParser

public class XMLParser
extends java.lang.Object
implements RDFConsts, XMLConsts


Fields inherited from interface org.mindswap.rdfparser.consts.RDFConsts
OLD_DAMLURL, RDF, RDF_About, RDF_AboutEach, RDF_AboutEachPrefix, RDF_Alt, RDF_Bag, RDF_BagID, RDF_Class, RDF_Comment, RDF_ConstraintProperty, RDF_Description, RDF_Domain, RDF_First, RDF_ID, RDF_IsDefinedBy, RDF_Label, RDF_Li, RDF_Nil, RDF_NodeID, RDF_Object, RDF_ParseType, RDF_Predicate, RDF_Property, RDF_Range, RDF_Resource, RDF_Rest, RDF_SeeAlso, RDF_Seq, RDF_SubClass, RDF_Subject, RDF_SubProperty, RDF_TERMS, RDF_Type, RDF_Value, RDFSURL, RDFURL
 
Fields inherited from interface org.mindswap.xmlparser.consts.XMLConsts
TARGET_NAMESPACE, XML_BASE, XML_Binary, XML_Boolean, XML_Byte, XML_CDATA, XML_COMPLEXTYPE, XML_Date, XML_Decimal, XML_Doctype, XML_Double, XML_ELEMENT, XML_Entity, XML_ENUMERATION, XML_Float, XML_IMPORT, XML_Int, XML_Integer, XML_Long, XML_MAXOCCURS, XML_MINOCCURS, XML_NAME, XML_NAMESPACE, XML_NegativeInteger, XML_NILLABLE, XML_NonNegativeInteger, XML_NonPositiveInteger, XML_PositiveInteger, XML_REF, XML_RESTRICTION, XML_SCHEMA, XML_SEQUENCE, XML_Short, XML_SIMPLETYPE, XML_String, XML_Time, XML_TimeDuration, XML_TYPE, XML_UnsignedByte, XML_UnsignedInt, XML_UnsignedLong, XML_UnsignedShort, XML_UriReference, XML_VALUE, XMLURL
 
Constructor Summary
XMLParser()
           
 
Method Summary
 XMLFile read(java.lang.String filename)
          The core function of the parser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLParser

public XMLParser()
Method Detail

read

public XMLFile read(java.lang.String filename)
             throws java.io.FileNotFoundException,
                    java.io.IOException,
                    XMLParserException
The core function of the parser. Takes as input the filename to parse and the abbreviation to use for the parsed file in the namespaces section. Returns an XMLFile which is the parsed representation of the file.

Parameters:
fn - The filename from which to load the XML and parse.
abbrev - The abbreviation to be associated with this file in the namespace declaration.
Returns:
The parsed object model (XMLFile) that represents the XML file, or null if loading XML spec.
Throws:
java.io.FileNotFoundException - If the provided url does not exist.
java.io.IOException - Thrown if there is some error during the reading of the file.
XMLParserException - Thrown when there is an error during parsing due to invalid formatting or other syntactical errors present in the file.