Java XML Attribute Remove removeDefaultNameSpaceAttributes(final Element element)

Here you can find the source of removeDefaultNameSpaceAttributes(final Element element)

Description

remove Default Name Space Attributes

License

Open Source License

Declaration

public static Element removeDefaultNameSpaceAttributes(final Element element) 

Method Source Code

//package com.java2s;
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

import org.w3c.dom.Element;

public class Main {
    public static Element removeDefaultNameSpaceAttributes(final Element element) {
        Element ret = element;//  w w w.j av a2  s. c  om

        ret.removeAttribute("xmlns:gmi");
        ret.removeAttribute("xmlns:gco");
        ret.removeAttribute("xmlns:gmd");
        ret.removeAttribute("xmlns:gml");
        ret.removeAttribute("xmlns:gmx");
        ret.removeAttribute("xmlns:ows");
        ret.removeAttribute("xmlns:xsi");
        ret.removeAttribute("xmlns:xlink");

        return ret;
    }
}

Related

  1. removeAttributes(Element e, String namespaceURI)
  2. removeAttributes(Element elem)
  3. removeAttributes(Element element)
  4. removeAttributes(Element target, boolean flag)
  5. removeAttributes(SOAPElement elem)
  6. removeEmptyAttributes(Element element)
  7. removeInvalidAttributes(Element element, String... validAttributeNames)
  8. removeNodeAttribute(Node node, String attributeName)
  9. removeNodeAttribute(Node node, String name)