Package nu.xom

Examples of nu.xom.Attribute.detach()


            for (int i = 0; i < element.getAttributeCount(); i++) {
               Attribute attribute = element.getAttribute(i);
              
               if (!"".equals(attribute.getNamespaceURI())) {
                  if (!"xml".equals(attribute.getNamespacePrefix())) {
                       attribute.detach();
                  }
               }
            }
           
            // Strip out additional namespaces
View Full Code Here


        }
       
        a1.detach();
        element2.addAttribute(a1);
       
        a2.detach();
        Element funky
          = new Element("xlink:funky", "http://www.funky.org");
        try {
            funky.addAttribute(a2);
            fail("added conflicting namespace");
View Full Code Here

        }
        catch (NamespaceConflictException success) {
            assertNotNull(success.getMessage());
        }
       
        a2.detach();
        Element notasfunky = new Element(
          "prefix:funky", "http://www.w3.org/TR/1999/xlink");
        notasfunky.addAttribute(a2);

View Full Code Here

   *
   * @param e The element to clean.
   */
  public static void deTagElement(Element e) {
    Attribute a = e.getAttribute("xtid");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanstart");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanend");
    if(a != null) {e.removeAttribute(a); a.detach();}
    for(int i=0;i<e.getChildElements().size();i++) {
View Full Code Here

   */
  public static void deTagElement(Element e) {
    Attribute a = e.getAttribute("xtid");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanstart");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanend");
    if(a != null) {e.removeAttribute(a); a.detach();}
    for(int i=0;i<e.getChildElements().size();i++) {
      deTagElement(e.getChildElements().get(i));
    }
View Full Code Here

    Attribute a = e.getAttribute("xtid");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanstart");
    if(a != null) {e.removeAttribute(a); a.detach();}
    a = e.getAttribute("xtspanend");
    if(a != null) {e.removeAttribute(a); a.detach();}
    for(int i=0;i<e.getChildElements().size();i++) {
      deTagElement(e.getChildElements().get(i));
    }
  }
   
View Full Code Here

        }
       
        a1.detach();
        element2.addAttribute(a1);
       
        a2.detach();
        Element funky
          = new Element("xlink:funky", "http://www.funky.org");
        try {
            funky.addAttribute(a2);
            fail("added conflicting namespace");
View Full Code Here

        }
        catch (NamespaceConflictException success) {
            assertNotNull(success.getMessage());
        }
       
        a2.detach();
        Element notasfunky = new Element(
          "prefix:funky", "http://www.w3.org/TR/1999/xlink");
        notasfunky.addAttribute(a2);

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.