Examples of XmlElement


Examples of net.n3.nanoxml.XMLElement

    return el;
  }
   private XMLElement makeNewConfig(String tag) {
       LogBuffer.println("Making new configuration file " + file);
       changed = true;
       return  new XMLElement(tag);
   }
View Full Code Here

Examples of net.n3.nanoxml.XMLElement

     *
     * @param xmlUrl url from which the text came from, since nanoxml sucks so damn hard.
     */
   public XmlConfig(java.net.URL xmlUrl, String tag) {
     url = xmlUrl;
     XMLElement el = null;
     if (url != null) {
       try {
          el = getXMLElementFromURL();
       } catch (XMLException ex) {
         LogBuffer.println("Error parsing XML code in configuration url");
         LogBuffer.println(url.toString());
         ex.printStackTrace();
         url = null;
         el = new XMLElement(ex.toString());
       } catch (java.security.AccessControlException sec) {
         sec.printStackTrace();
         throw sec;
       } catch (Exception ex) {
         //      el = new XMLElement(ex.toString());
         LogBuffer.println(ex.toString());
         ex.printStackTrace();
       }
     }
    
     if (el == null) {
       el = new XMLElement(tag);
     }
    
     root = new XmlConfigNode(el);
   }
View Full Code Here

Examples of net.n3.nanoxml.XMLElement

     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws XMLException
     */
    private XMLElement getXMLElementFromURL() throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException {
      XMLElement el;
      String xmlText     = "";
      Reader st          = new InputStreamReader(url.openStream());
      int ch             = st.read();
      while (ch != -1) {
        char[] cbuf  = new char[1];
View Full Code Here

Examples of net.n3.nanoxml.XMLElement

  public ConfigNode create(String name) {
    if (root == null) {
      LogBuffer.println("Warning: root is null, creating dummy config node");
      return new DummyConfigNode(name);
    }
      XMLElement kid = new XMLElement(name);
      root.addChild(kid);
      XmlConfig.this.changed = true;
      return new XmlConfigNode(kid);
   }
View Full Code Here

Examples of net.sourceforge.nanoxml.XMLElement

     * @return
     * @throws XMLParseException
     * @throws IOException
     */
    public RunResult parse(Reader r) throws XMLParseException, IOException {
        XMLElement xmlRun = new XMLElement();
        BufferedReader reader = null;
       
        try {
            reader = new BufferedReader(r);
            xmlRun.parseFromReader(reader);
   
            checkTag(xmlRun, RUN_RESULT);
           
            String attr;
            RunResult run = new RunResult(getValue(xmlRun, RUN_NAME, ""));
           
            for (Enumeration enumPkg = xmlRun.enumerateChildren(); enumPkg.hasMoreElements(); ) {
                XMLElement xmlPkg = (XMLElement) enumPkg.nextElement();
                int indexTag = checkTag(xmlPkg, new String[]{PACKAGE_RESULT, PROPERTY});
               
                if (indexTag == 1) {
                    String name  = getValue(xmlPkg, PROPERTY_NAME, "");
                    String value  = getValue(xmlPkg, PROPERTY_VALUE, "");
                    run.setSystemProperty(name, value);
                    continue;
                }
               
                attr = getValue(xmlPkg, PACKAGE_NAME, "");
                PackageResult pkg = new PackageResult(attr);            
                run.add(pkg);
               
                for (Enumeration enumCls = xmlPkg.enumerateChildren(); enumCls.hasMoreElements(); ) {
                    XMLElement xmlCls = (XMLElement) enumCls.nextElement();
                    checkTag(xmlCls, CLASS_RESULT);
                   
                    attr = getValue(xmlCls, CLASS_NAME, "");
                    ClassResult cls = new ClassResult(attr);
                    pkg.add(cls);
                   
                    for (Enumeration enumTest = xmlCls.enumerateChildren(); enumTest.hasMoreElements(); ) {
                        XMLElement xmlTest = (XMLElement) enumTest.nextElement();
                        checkTag(xmlTest, TEST_RESULT);
                       
                        attr = getValue(xmlTest, TEST_NAME, "");
                        TestResult test = new TestResult(attr);
                        cls.add(test);
                       
                        for (Enumeration enumCheck = xmlTest.enumerateChildren(); enumCheck.hasMoreElements(); ) {
                            XMLElement xmlCheck = (XMLElement) enumCheck.nextElement();
                            if (TEST_ERROR.equals(xmlCheck.getName())) {
                                test.setFailedMessage(xmlCheck.getContent());
                            } else {
                                checkTag(xmlCheck, CHECK_RESULT);
                               
                                test.add(createCheck(xmlCheck));
                            }
View Full Code Here

Examples of net.xoetrope.xml.XmlElement

  {
    BufferedReader r = null;
    try {
      r = currentProject.getBufferedReader( file, null );
      if ( r != null ) {
        XmlElement element = XmlSource.read( r );
        loadXStyle( element, null );
        baseStyle = getStyle( "base" );
      }
    }
    catch ( Exception ex ) {
View Full Code Here

Examples of nokogiri.XmlElement

    public static IRubyObject constructNode(Ruby runtime, Node node) {
        if (node == null) return runtime.getNil();
        // this is slow; need a way to cache nokogiri classes/modules somewhere
        switch (node.getNodeType()) {
            case Node.ELEMENT_NODE:
                XmlElement xmlElement = (XmlElement) NokogiriService.XML_ELEMENT_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::Element"));
                xmlElement.setNode(runtime.getCurrentContext(), node);
                return xmlElement;
            case Node.ATTRIBUTE_NODE:
                XmlAttr xmlAttr = (XmlAttr) NokogiriService.XML_ATTR_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::Attr"));
                xmlAttr.setNode(runtime.getCurrentContext(), node);
                return xmlAttr;
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.xml.XmlElement

                } catch (XmlSerializingException e) {
                    new XMLStreamException("Problem in serializing the return object", e);
                }
            }
        };
        XmlElement outXmlElement = operation.getOutPutElement();
        QName outElementQName = new QName(outXmlElement.getNamespace(), outXmlElement.getName());
        return new OMSourcedElementImpl(outElementQName, soapFactory, omDataSource);
    }
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElement

        }
    }

    private void emitStanza() {
        isBodyPayloadDecoded = true;
        XMLElement element = builder.build();
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("BOSH decoding request: {}", new Renderer(element).getComplete());
        }
        boshHandler.process(request, (Stanza) element);
        builder = null;
View Full Code Here

Examples of org.apache.woden.XMLElement

    private void addDocumentation(AxisDescription axisDescription, DocumentableElement element) {
        DocumentationElement[] documentationElements = element.getDocumentationElements();
        String documentation = "";
        for (int i = 0; i < documentationElements.length; i++) {
            DocumentationElement documentationElement = documentationElements[i];
            XMLElement contentElement = documentationElement.getContent();
            Element content = (Element)contentElement.getSource();
            if (content != null) {
                documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
            }
        }
        if (!"".equals(documentation)) {
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.