Package nu.xom

Examples of nu.xom.Element.toXML()


    args[2][0] = "name";
    args[2][1] = "df.skchr";
    args[3][0] = "designID";
    args[3][1] = sharedChairID;
   
    return GLOBAL.cloudHook.postAction("uploadDesign",args,root.toXML().getBytes());
  }
 
 
 
  String uploadPattern(String sharedChairID, float scale, float materialWidth,  float pageWidth, float pageHeight, boolean autoPack, boolean isPaperCut, boolean addDogBones, boolean addLabels){
View Full Code Here


   
   
   
   
    LOGGER.info("uploading now");
    return GLOBAL.cloudHook.postAction("uploadPattern",args,root.toXML().getBytes());
   
   
   
 
   
View Full Code Here

        XSLTransform xform = new XSLTransform(stylesheetDoc);
        xform.setParameter("test", new Double(2));
        Nodes output = xform.transform(builder.build(doc));
        assertEquals(1, output.size());
        Element result = (Element) output.get(0);
        assertEquals("<root>2</root>", result.toXML());
       
    }

   
    public void testSetParameterWithNamespace()
View Full Code Here

        xform.setParameter("test", "http://www.xom.nu/", new Double(2));
        Nodes output = xform.transform(builder.build(doc));
        assertEquals(1, output.size());
        Element result = (Element) output.get(0);
        assertEquals("<root xmlns:pre=\"http://www.xom.nu/\">2</root>",
            result.toXML());
       
    }

   
    public void testRemoveParameterWithNamespace()
View Full Code Here

        xform.setParameter("test", "http://www.xom.nu/", null);
        Nodes output = xform.transform(builder.build(doc));
        assertEquals(1, output.size());
        Element result = (Element) output.get(0);
        assertEquals("<root xmlns:pre=\"http://www.xom.nu/\">1</root>",
            result.toXML());
       
    }

   
    public void testRemoveParameter()
View Full Code Here

        xform.setParameter("test", new Double(2));
        xform.setParameter("test", null);
        Nodes output = xform.transform(builder.build(doc));
        assertEquals(1, output.size());
        Element result = (Element) output.get(0);
        assertEquals("<root>1</root>", result.toXML());
       
    }

   
    public void testTransformWithCFilter()
View Full Code Here

       
        String name = "sakjdhjhd";
        String uri = "http://www.something.com/";
        Element e = new Element(name, uri);
       
        String s = e.toXML();
        assertTrue(s.endsWith("/>"));
        assertTrue(s.startsWith("<" + name));
        assertTrue(s.indexOf(uri) != -1);
        assertTrue(s.indexOf("xmlns=") != -1);   
       
View Full Code Here

        Builder builder = new Builder();
        File f = new File("data");
        f = new File(f, "soapresponse.xml");  
        Document doc = builder.build(f);
        Element root = doc.getRootElement();
        String  form = root.toXML();
        Document doc2
          = builder.build(form, f.toURL().toExternalForm());
        Element root2 = doc2.getRootElement();
        assertEquals(root, root2);
        
View Full Code Here

   
    public void testToXMLWithXMLLangAttribute() {
        Element e = new Element("e");
        e.addAttribute(new Attribute("xml:lang",
          "http://www.w3.org/XML/1998/namespace", "en"));
        assertEquals("<e xml:lang=\"en\" />", e.toXML());
    }   

   
    public void testAllowNullNamespace() {
        String name = "sakjdhjhd";
View Full Code Here

          new Attribute("xml:space",
            "http://www.w3.org/XML/1998/namespace",
            "preserve"));
        e.addAttribute(
          new Attribute("zzz:zzz", "http://www.example.org", "preserve"));
        String result = e.toXML();
        assertEquals("<test xmlns:zzz=\"http://www.example.org\" xml:space=\"preserve\" zzz:zzz=\"preserve\" />", result);
    }

   
    public void testGetNamespacePrefixInt() {
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.