|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--DOMParserWrapper
This class wraps the DOM parser, with integrated transparent name
resolution through the Catalog class. This wrapper will make
it simpler to migrate to JAXP or to change parser features.
| Field Summary | |
static java.lang.String |
FEATURE_CREATE_ENTITY_REF_NODES
|
static java.lang.String |
FEATURE_VALIDATION
|
| Constructor Summary | |
DOMParserWrapper()
|
|
| Method Summary | |
static Catalog |
getCatalog()
Returns the catalog. |
static org.apache.xerces.parsers.DOMParser |
getParser()
Returns the DOM parser. |
static void |
initialize()
Initializes the parser. |
static void |
loadCatalog(java.lang.String loc,
ArborAgent agent)
Loads the catalog file specified by the URL loc (in string
form). |
static void |
loadCatalog(java.lang.String loc,
ArborAgent agent,
boolean ignoreErrors)
Loads the catalog file specified by the URL loc (in string
form). |
static org.w3c.dom.Document |
parseDocument(java.lang.String loc,
ArborAgent agent)
Parses the XML file at loc and returns the DOM
Document. |
static org.w3c.dom.Document |
parseDocument(java.net.URL url,
ArborAgent agent)
Parses the XML file at url and returns the DOM
Document. |
static java.util.Map |
retrieveEntityValueMapFor(org.w3c.dom.Document doc)
Retrieves the entity value map for a parsed document, and clears reference held in realEntities hash. |
static void |
setErrorHandler(org.xml.sax.ErrorHandler err)
Sets the error handler used by the DOM parser. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String FEATURE_VALIDATION
public static final java.lang.String FEATURE_CREATE_ENTITY_REF_NODES
| Constructor Detail |
public DOMParserWrapper()
| Method Detail |
public static void initialize()
public static void loadCatalog(java.lang.String loc,
ArborAgent agent)
loc (in string
form).loc - catalog URLagent - ArborAgent
public static void loadCatalog(java.lang.String loc,
ArborAgent agent,
boolean ignoreErrors)
loc (in string
form).loc - catalog URLagent - ArborAgentignoreErrors - keep silent about errorspublic static void setErrorHandler(org.xml.sax.ErrorHandler err)
err - error handlerpublic static org.apache.xerces.parsers.DOMParser getParser()
public static Catalog getCatalog()
public static org.w3c.dom.Document parseDocument(java.lang.String loc,
ArborAgent agent)
throws org.xml.sax.SAXException,
java.io.IOException
loc and returns the DOM
Document.loc - location of XML fileagent - ArborAgent
public static org.w3c.dom.Document parseDocument(java.net.URL url,
ArborAgent agent)
throws org.xml.sax.SAXException,
java.io.IOException,
java.net.MalformedURLException
url and returns the DOM
Document.url - location of XML fileagent - ArborAgentpublic static java.util.Map retrieveEntityValueMapFor(org.w3c.dom.Document doc)
realEntities hash.doc - DOM
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||