Can't find the links i've looked at, but here's the code I'm currently
using. This example probably shows most of the xml data-access capabilities:

//in this case, we're only pulling the title of a video,
//if a section has any videos!

      import com.xfactorstudio.xml.xpath.*;
.
.
.
       var path:String = "/content/section/[EMAIL PROTECTED]'" + id + 
"']/video";
       var videos:Array = XPath.selectNodes( xmlDoc, path );

           for ( var i:Number = 0; i<videos.length; i++ ) {
               var video:XML = new XML( videos[i] );
               path = XPath.selectSingleNode( video, "video/source"
).firstChild.nodeValue;
               var title:String  = XPath.selectSingleNode( video,
"video/title" ).firstChild.nodeValue;
           }


example xml:

<?xml version="1.0" encoding="utf-8" ?>
<content>
   <section id="1.0">
       <title>
           <![CDATA[...text here...]]>
       </title>
   </section>

   <section id="1.1">
       <title>Higher Fatality Rates and Costs</title>
       <bkgd_img>assets/pics/to_load/safety_concerns_tab1.jpg</bkgd_img>
       <text>....</text>
       <video>
          <title>....</title>
       </video>
    </section>
.
.
.
</content>

On 10/19/06, Chip Moeser <[EMAIL PROTECTED]> wrote:

Does anyone know where I can samples using these (http://
www.xfactorstudio.com/) xpath classes?
Thanks!
-Chip

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--

: : ) Scott
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to