org.eclipse.gmt.umlx.registry.resource
Class XMLRootNamespaceParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.eclipse.gmt.umlx.registry.resource.XMLRootNamespaceParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class XMLRootNamespaceParser
extends org.xml.sax.helpers.DefaultHandler

The XMLRootNamespaceParser.parse(InputStream) method supports examination of an XML input stream to locate and return the URI of the root namespace, or null if none.


Nested Class Summary
static class XMLRootNamespaceParser.FoundRootURIException
           
 
Constructor Summary
XMLRootNamespaceParser()
           
 
Method Summary
static java.lang.String parse(java.io.InputStream inputStream)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLRootNamespaceParser

public XMLRootNamespaceParser()
Method Detail

parse

public static java.lang.String parse(java.io.InputStream inputStream)
                              throws javax.xml.parsers.ParserConfigurationException,
                                     org.xml.sax.SAXException,
                                     java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String name,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException