Examples of XmlParse


Examples of com.ojl.xmlparser.XmlParse

  }
 
  public void prepareSounds()
  {
   
    XmlParse xp = new XmlParse(this.soundsXml);
   
    //Getting all Categories
    ArrayList<?> catsObj = xp.getElements("Category");

    for (Object catObj: catsObj)
    {
      //Fetch Categories Label and Folder - And add it to main list.
      String id = xp.getAttribute(catObj,"id");
      String label = xp.getAttribute(catObj,"Label");
      String folder = xp.getAttribute(catObj,"Folder");
      SoundCategory sndCat = new SoundCategory(Integer.parseInt(id), label, folder);
      this.soundCats.add(sndCat);
     
      //Now fetch the items
      ArrayList<?> itmsObj = xp.getElements((Element) catObj, "Item");
      for (Object itmObj: itmsObj)
      {
        String itmId = xp.getAttribute(itmObj,"id");
        String itmLabel = xp.getAttribute(itmObj,"Label");
        String itmFile = xp.getAttribute(itmObj,"File");
       
        SoundItem sndItm = new SoundItem(Integer.parseInt(itmId), itmLabel, itmFile);
        sndCat.Items.add(sndItm);
      }     
     
View Full Code Here

Examples of org.teiid.query.sql.symbol.XMLParse

      f.setPassing(Arrays.asList(new DerivedColumn(null, new ElementSymbol("foo"))));
      helpTestExpression("xmlquery('/x' passing foo null on empty)", "XMLQUERY('/x' PASSING foo NULL ON EMPTY)", f);
    }
   
    @Test public void testXmlParse() throws Exception {
      XMLParse f = new XMLParse();
      f.setDocument(true);
      f.setExpression(new ElementSymbol("x"));
      f.setWellFormed(true);
      helpTestExpression("xmlparse(document x wellformed)", "XMLPARSE(DOCUMENT x WELLFORMED)", f);
    }
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.