1 Reply Latest reply: Jul 17, 2013 8:43 AM by poortip87 RSS

    How to traverse hyphenated nodes of an xml?

    poortip87 Community Member

      Hi,

       

      I have an xml structure as follows,

      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ucreate="http://www.xmpie.com/ucreate">

                                                                                                <fo:layout-master-set>

                                                                                                               <fo:simple-page-master>

                                                                                                               </fo:simple-page-master>

                                                                                                </fo:layout-master-set>

      </fo:root>

       

      Now, I need to traverse this structure. This is not possible in the usual manner like xml.fo:layout-master-set. Flex gives a compile error here. On searching I found that I could traverse to fo:layout-master-set via the namespace. As follows,

       

      var foNm:Namespace = xml.namespace("fo");

      var childNode:XMLList = xml.foNm::["layout-master-set"];

       

      After execution, childNode holds the correct list which is for layout-master-set.

       

      However, I need to traverse to simple-page-master node. I tried to do that in a similar manner.

      var childNode:XMLList = xml.foNm::["simple-page-master"];

       

      But in this case childNode comes up empty. How can I do this?

       

      Please guide.