org.n52.security.common.xml
Class XMLNamespaceAttributeDeclarationRemover

java.lang.Object
  extended by org.n52.security.common.xml.XMLNamespaceAttributeDeclarationRemover

public class XMLNamespaceAttributeDeclarationRemover
extends Object

This utility removes all xmlns attribute declarations from the dom, but preserves indirect referenced namespaces e.g. linked via attribute/element content( xsi:type="prefix:...").

Author:
Marko Reiprecht

Constructor Summary
XMLNamespaceAttributeDeclarationRemover()
           
 
Method Summary
 Document removeNSDecls(Document document)
          Method removes the namespace declarations.
 Element removeNSDecls(Element node)
          Method removes all namespace attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLNamespaceAttributeDeclarationRemover

public XMLNamespaceAttributeDeclarationRemover()
Method Detail

removeNSDecls

public Document removeNSDecls(Document document)
Method removes the namespace declarations.

Parameters:
document - the document.
Returns:
Document.

removeNSDecls

public Element removeNSDecls(Element node)
Method removes all namespace attributes.

Parameters:
node - the root.
Returns:
Element.


Copyright © 2004–2014 52north.org. All rights reserved.