示例#1
0
  public void initXMLObject() {

    numProfiles = xmlFeed.getChildCount();
    println("NUM PROFILES: " + numProfiles);
    for (int i = 0; i < numProfiles; i++) {
      XMLElement profile = xmlFeed.getChild(i);
      /// *
      try {
        headerList.add(profile.getChild(0).getContent());
        nameList.add(profile.getChild(1).getContent());
        blurbList.add(profile.getChild(2).getContent());
        // videoPathList.add(profile.getChild(3).getContent());
        thePopUp.videoPath.add(profile.getChild(3).getContent());
        latList.add(profile.getChild(4).getContent());
        longList.add(profile.getChild(5).getContent());

        pApp.println("Title= " + profile.getChild(0).getContent());
        pApp.println("Name= " + profile.getChild(1).getContent());
        pApp.println("Blurb= " + profile.getChild(2).getContent());
        // pApp.println("video = " +  profile.getChild(3).getContent());
        pApp.println("Address = " + profile.getChild(4).getContent());
        // pApp.println("long = " + profile.getChild(5).getContent());
        // pApp.println(" ");
        pApp.println(" ");
      } catch (Exception e) {
        println("XML init error: " + e);
      }
    }
    /// now that the popup video array has data, init the video
    thePopUp.initVideo();
    /// convert the lat and long string to floats
    initLocations();
  }
示例#2
0
 /////////////////////////////////////////////
 // //init the location array
 ///// with ip addresses from the DB
 /////////////////////////////////////////////
 /////// PARSE XML DATA /////////////
 ///////////////////////////////////////
 public void loadXML() {
   try {
     xmlFeed = new XMLElement(this, xmlPath);
     initXMLObject();
   } catch (Exception e) {
     pApp.println("unable to parse xml: " + e);
   }
 }