xml tutorial

Forum Home Forum Home > Construct 2 General > Construct 2 general
 Post Reply Post Reply Page  12>
Author
936 Rep
Post Options Post Options   Quote kentkan Quote  Post ReplyReply Direct Link To This Post Topic: xml tutorial
    Posted: 21 May 2012 at 4:20pm
Could someone help for showing up some demonstration of XML?
Back to Top
13,268 Rep
Post Options Post Options   Quote Velojet Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2012 at 9:41pm
@kentkan Happy to help, but you need to tell us exactly what you're wanting to do with XML (and why JSON mightn't do it better).
Back to Top
936 Rep
Post Options Post Options   Quote kentkan Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2012 at 3:25pm
I would like a capx file that showing me how to parse xml file with XPath syntax
Back to Top
227 Rep
Post Options Post Options   Quote alanyreu Quote  Post ReplyReply Direct Link To This Post Posted: 13 Aug 2012 at 1:31pm
hi, theres a decent xml tutorial here, its basically like any markup language, you just have to know the tags, xml is quite basic remember to open <xml> and close with </xml>, inside you can use whatever tags you like.
Back to Top

Moderator
28,550 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 13 Aug 2012 at 2:41pm
Since this topic, this cool tutorial about XML parsing in C2 with a nice and clear example and capx to download was posted.
Back to Top
2,873 Rep
Post Options Post Options   Quote xeed Quote  Post ReplyReply Direct Link To This Post Posted: 17 Aug 2012 at 3:51am
where can i find the external xml file in the capx? where to save, and how to load it?

Still missing a complete tutorial for simple loading external text of an xml file into a textbox in c2.
Back to Top

Moderator
28,550 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 17 Aug 2012 at 5:37am
@xeed: You can get your XML string thanks to the AJAX plugin.
You might also want to check how to use project files in construct 2.
Back to Top

Scirra Developer
78,371 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 17 Aug 2012 at 10:07am
There's also an example of using the XML object in Construct 2's examples folder (in the install directory).
Back to Top
2,873 Rep
Post Options Post Options   Quote xeed Quote  Post ReplyReply Direct Link To This Post Posted: 22 Aug 2012 at 5:41pm
Thank you Ashley. But I am still confused...for the XML Object i need to enter the XML Data in the "load" window, right? So the XML Object is not to load XML Data, but kind of integrated XML Sheet in C2?

@Kyatric: Is there any example for loading XML Sheets via Ajax? The documentation does not bring me forward in this case.

Many thanks :)
Back to Top

Moderator
28,550 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 22 Aug 2012 at 5:46pm
Quote Loading XML data

If you want to read an XML file stored with the project, import the XML file as a project file. Then you can use the AJAX object's Request project file action to download the file, and then load the result in to the XML object. The events below show how this can be done.



In the very documentation I linked about project files in C2.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down