Package com.helger.xml.serialize.write
Class AbstractXMLSerializer.NamespaceStack
java.lang.Object
com.helger.xml.serialize.write.AbstractXMLSerializer.NamespaceStack
- Enclosing class:
AbstractXMLSerializer<NODETYPE>
Contains the hierarchy of XML namespaces within a document structure.
Important: null namespace URIs are different from empty namespace URIs!
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNamespaceMapping(String sPrefix, String sNamespaceURI) Add a new prefix-namespace URI mapping at the current stack levelgetAttributeNamespacePrefixToUse(String sNamespaceURI, String sName, String sValue, Map<QName, String> aAttrMap) getElementNamespacePrefixToUse(String sNamespaceURI, boolean bIsRootElement, Map<QName, String> aAttrMap) voidpop()End the current namespace level.voidpush()Start a new namespace level.intsize()
-
Constructor Details
-
NamespaceStack
-
-
Method Details
-
push
public void push()Start a new namespace level. -
addNamespaceMapping
Add a new prefix-namespace URI mapping at the current stack level- Parameters:
sPrefix- Prefix to use. May benull.sNamespaceURI- Namespace URI to use. May neither benullnor empty.
-
pop
public void pop()End the current namespace level. -
size
-
getElementNamespacePrefixToUse
-
getAttributeNamespacePrefixToUse
-