public class XMLNamespaceParser
extends org.xml.sax.helpers.DefaultHandler
Constructor and Description |
---|
XMLNamespaceParser(java.io.Reader xml)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNamespace()
Get the namespace of the document (root element).
|
java.lang.String |
getNoNamespaceSchemaLocation()
Get the value of noNamespaceSchemaLocation of the document (root element).
|
void |
parse()
Parse the xml file
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
SAX Handler that is called at the start of each XML element
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public XMLNamespaceParser(java.io.Reader xml) throws org.xml.sax.SAXException, edu.ucsb.nceas.utilities.PropertyNotFoundException
xml
- the xml object which will be parsedorg.xml.sax.SAXException
edu.ucsb.nceas.utilities.PropertyNotFoundException
public void parse() throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
- if some sax related exception happensjava.io.IOException
- if the schema content couldn't be foundpublic void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public java.lang.String getNamespace()
public java.lang.String getNoNamespaceSchemaLocation()
Copyright © 2020 Regents of the University of California. All Rights Reserved.