Skip to main content
Known Participant
February 13, 2009
Question

Cant parse xml

  • February 13, 2009
  • 1 reply
  • 242 views
    This topic has been closed for replies.

    1 reply

    Inspiring
    February 13, 2009
    Florida wrote:
    > I am trying to parse XML using Cold Fusion 8 and it doesnt work.
    > My attempt:
    > <cfscript>
    > xmlfile = xmlparse(cfhttp.filecontent);
    > xmlsize = arraylen(xmlfile.PersonData.xmlchildren);

    ...

    You have an extra element PeopleAction in your XML:
    > <PeopleAction>
    > <PersonData>

    You can access the data like this:
    xmlsize = arraylen(xmlfile.PeopleAction.PersonData.xmlchildren);

    --
    Mack