XML Parsing

Get help using Construct 2

Post » Wed Aug 22, 2012 12:01 pm

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: http://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>"
B
3
Posts: 2
Reputation: 654

Post » Wed Aug 22, 2012 12:16 pm

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.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Aug 22, 2012 1:01 pm

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?
B
3
Posts: 2
Reputation: 654


Return to How do I....?

Who is online

Users browsing this forum: MarkThomas and 0 guests