xml tutorial

Discussion and feedback on Construct 2

Post » Mon May 21, 2012 4:20 pm

Could someone help for showing up some demonstration of XML?
B
9
S
4
Posts: 14
Reputation: 1,436

Post » Mon May 21, 2012 9:41 pm

@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).
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Tue May 22, 2012 3:25 pm

I would like a capx file that showing me how to parse xml file with XPath syntax
B
9
S
4
Posts: 14
Reputation: 1,436

Post » Mon Aug 13, 2012 1:31 pm

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.
B
2
Posts: 1
Reputation: 252

Post » Mon Aug 13, 2012 2:41 pm

Since this topic, this cool tutorial about XML parsing in C2 with a nice and clear example and capx to download was posted.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Aug 17, 2012 3:51 am

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.
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Fri Aug 17, 2012 5:37 am

@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.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Aug 17, 2012 10:07 am

There's also an example of using the XML object in Construct 2's examples folder (in the install directory).
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Aug 22, 2012 5:41 pm

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 :)
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Wed Aug 22, 2012 5:46 pm

[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.[/quote]


In the very documentation I linked about project files in C2.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, blackant, Eisenhans, Prominent, shinichild and 11 guests