XML Parsing

0 favourites
  • 3 posts
  • Hello

    I am using Construct 2 free edition. I just wanted to reproduce your xml parsing example but my project doesn't seem to work even if it is almost the same with the example. (the example works)

    I am using Chrome and Mozilla to test this.

    I attached the project.. maybe somebody knows what is happening. (The for each statement does not go through all the nodes)

    link to project: dl.transfer.ro/transfer_ro-22aug-c5225c8286c2.zip

    the XPath query is: "/bookstore/book"

    the xml is:

    "<?xml version=""1.0"" ?>

    <bookstore>

    <book category=""COOKING"">

    <title lang=""en"">Everyday Italian</title>

    <author>Giada De Laurentiis</author>

    <year>2005</year>

    <price>30.00</price>

    </book>

    <book category=""CHILDREN"">

    <title lang=""en"">Harry Potter</title>

    <author>J K. Rowling</author>

    <year>2005</year>

    <price>29.99</price>

    </book>

    <book category=""WEB"">

    <title lang=""en"">XQuery Kick Start</title>

    <author>James McGovern</author>

    <author>Per Bothner</author>

    <author>Kurt Cagle</author>

    <author>James Linn</author>

    <author>Vaidyanathan Nagarajan</author>

    <year>2003</year>

    <price>49.99</price>

    </book>

    <book category=""WEB"">

    <title lang=""en"">Learning XML</title>

    <author>Erik T. Ray</author>

    <year>2003</year>

    <price>39.95</price>

    </book>

    </bookstore>"

  • Doesn't look like the XML object is in the layout, could've been caused by a bug. Try deleting the XML object and adding it again, should probably work then.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the thing is that this sort of thing happened to me alot of times (I have alot of xml parsing in my current project). Sometimes the deletion and readd fixed the issue..sometimes it didn't.. do you know some steps to assure this bug never happens.. maybe I'm missing something?

    Do you have a method I could debug the code see what happens in the bacground?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)