public class SimpleNamespaceResolver extends Object implements NamespaceContext
Namespace resolver for XML documents, which relates XML Namespace Prefixes to XML Namespace URIs. Doubles as a JAXB NamespaceContext, if we decide to use JAXB instead of DOM to parse our generated schema files.
| Constructor and Description | 
|---|
| SimpleNamespaceResolver(File xmlFile)Creates a new SimpleNamespaceResolver which collects namespace data
 from the provided XML file. | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getLocalNamespaceURI() | 
| String | getNamespaceURI(String prefix) | 
| Map<String,String> | getNamespaceURI2PrefixMap() | 
| String | getPrefix(String namespaceURI) | 
| Iterator<String> | getPrefixes(String namespaceURI) | 
| String | getSourceFilename() | 
public SimpleNamespaceResolver(File xmlFile)
xmlFile - The XML file from which to collect namespace data, should not be null.public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String namespaceURI)
getPrefix in interface NamespaceContextpublic Iterator<String> getPrefixes(String namespaceURI)
getPrefixes in interface NamespaceContextpublic Map<String,String> getNamespaceURI2PrefixMap()
public String getLocalNamespaceURI()
public String getSourceFilename()
Copyright © 2005–2015 MojoHaus. All rights reserved.