Class NamespaceContext
java.lang.Object
eu.maveniverse.domtrip.NamespaceContext
Represents a namespace context for XML elements, providing namespace URI resolution
and prefix management functionality.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty namespace context.NamespaceContext(Map<String, String> prefixToUri, String defaultNamespaceURI) Creates a namespace context with the given prefix-to-URI mappings. -
Method Summary
Modifier and TypeMethodDescriptionGets all declared namespace URIs.Gets all declared prefixes (excluding xml and xmlns).Gets the default namespace URI.booleanisNamespaceUriDeclared(String namespaceURI) Checks if the given namespace URI is declared in this context.booleanisPrefixDeclared(String prefix) Checks if the given prefix is declared in this context.namespaceURI(String prefix) Gets the namespace URI for the given prefix.Gets the first prefix bound to the given namespace URI.Gets all prefixes bound to the given namespace URI.toString()
-
Constructor Details
-
NamespaceContext
public NamespaceContext()Creates an empty namespace context. -
NamespaceContext
-
-
Method Details
-
namespaceURI
-
prefix
-
prefixes
-
defaultNamespaceURI
Gets the default namespace URI. -
isPrefixDeclared
Checks if the given prefix is declared in this context. -
isNamespaceUriDeclared
Checks if the given namespace URI is declared in this context. -
declaredPrefixes
-
declaredNamespaceURIs
-
toString
-