Help with revXML

william humphrey bill at bluewatermaritime.com
Sun Dec 8 19:25:38 EST 2013


If I do:    put revXMLChildNames(pTree, "Country_List", return,
"Country", true) into tCountries

Then I get the list with brackets but no creative use of any permutation of

repeat for each line theCountry in tCountries

        put revXMLNodeContents(pTree, "Country_List/" & theCountry) &
return after tListOfCountries

    end repeat

Will give me any contents.

Please help

On Sun, Dec 8, 2013 at 8:08 PM, william humphrey
<bill at bluewatermaritime.com> wrote:
> Hi
>
> I have a large XML file like this:
>
> <Country_List>
> <Country>
> <Country_Name>AFGHANISTAN</Country_Name>
> <ISO_Code>AF</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ALBANIA</Country_Name>
> <ISO_Code>AL</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ALGERIA</Country_Name>
> <ISO_Code>DZ</ISO_Code>
> </Country>
> <Country>
> <Country_Name>AMERICAN SAMOA</Country_Name>
> <ISO_Code>AS</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ANDORRA</Country_Name>
> <ISO_Code>AD</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ANGOLA</Country_Name>
> <ISO_Code>AO</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ANGUILLA</Country_Name>
> <ISO_Code>AI</ISO_Code>
> </Country>
> <Country>
> <Country_Name>ANTARCTICA</Country_Name>
> <ISO_Code>AQ</ISO_Code>
> </Country>
> </Country_List>
>
> And I tried:
>
>  put revXMLChildNames(pTree, "Country_List/Country", return,
> "Country_Name", true) into tCountries
>
> And all I get is just the first child name and not the list.  I get just one
>
> Country_Name[1]  (and it stops there)  -- I'd also like to get the
> ISO_Code too as a list with a tab between it and the country name
> but....



-- 
http://www.bluewatermaritime.com




More information about the use-livecode mailing list