playMaker

Author Topic: [solved] Handling XML Files  (Read 4764 times)

Drunkenoodle

  • Playmaker Newbie
  • *
  • Posts: 25
[solved] Handling XML Files
« on: November 11, 2012, 05:48:36 PM »
Hi chaps,
I'm looking into creating a few little games that involve quite a lot of dialogue text (rpg's & adventure games basically). After much searching it would appear that a few have elected to store lots of their conversational data within XML files.

If that's the case, is it possible to get playmaker to handle these types of files? So far all I've managed to do is grab one single tag using the 'get property' script, and can't seem to get anything else from there.

Is there a better way to get around this? Or am I completely barking up the wrong tree...

Many thanks for your time,
-D
« Last Edit: November 12, 2012, 08:11:25 AM by Drunkenoodle »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Handling XML Files
« Reply #1 on: November 12, 2012, 07:52:06 AM »
Hi,

 You will need a framework for this, PlayMaker can not access xml files and process xPath queries as is.

 I do plan on implementing XML within PlayMaker and I already started a while back, and simply lack of time to actually commit further to that.

 pm me if you need something to be done on that front. It is indeed something involving so you know.


bye,

 Jean

Drunkenoodle

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Handling XML Files
« Reply #2 on: November 12, 2012, 08:10:04 AM »
Hi Jean,
Many thanks and yes, totally understand the magnitude of what's involved! I'll see what I can knock together in the meantime. Should anything come to pass, I'll pop up a preview of it in case anyone including yourself may find it useful.

Thanks again! :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [solved] Handling XML Files
« Reply #3 on: November 12, 2012, 08:50:55 AM »
Hi,

 cool, in all cases, using ArrayMaker as a way to store results is a good start. that's how I would plan it. so that when you query your xml for xpath that you know will return a series of results with several values, I would use ArrayMaker to store that result, each arrayList being one value or attribute within the results. Then you are "only" left with executing the xpath query to the xml file and inject the result back into the arrayMaker.

 If you need an example of an action doing just that, let me know, I have done this for Parse.com so this could help you progress faster,

bye,

 Jean

Drunkenoodle

  • Playmaker Newbie
  • *
  • Posts: 25
Re: [solved] Handling XML Files
« Reply #4 on: November 12, 2012, 05:31:00 PM »
Just one final note, Jean, ArrayMaker is fantastic!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [solved] Handling XML Files
« Reply #5 on: November 13, 2012, 01:07:06 AM »
Hi,

 Thanks :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [solved] Handling XML Files
« Reply #6 on: November 16, 2012, 07:30:18 AM »
« Last Edit: July 31, 2013, 11:16:22 AM by jeanfabre »