PlayMaker Updates & Downloads > Share New Actions

DataMaker Xml xPath and Json [ECOSYSTEM] [FEBRUARY 2022]

(1/19) > >>

jeanfabre:
[EDIT] NOW on the wiki: https://hutonggames.fogbugz.com/default.asp?W1133

[EDIT] Also available on the Ecosystem

Hi,

 Ok, I have an xml reader with a first action to select a node using Xpath! it's very very powerful!! Many features need to be added like being able to select multiple nodes, and output them into ArrayMaker for example, but for now this hilite the ease of use and power and is already very useful as is actually!

 basically it works like this:

1: create a DataMaker Xml Proxy and point to a text resource in your assets
2: then use the action "XPath Select Single Node" and point to that proxy to use xpath queries on that resource.

-- Xpath wildcard system
instead of letting you just input a string, I have created a simple wildcard format that allow you to define places in the xpath query that are flexible and points to FsmSTring variables.

in the sample provide, the xPath looks like

--- Code: ---content[@type='%%0%%']
--- End code ---

the action has defined one XPath variable for an FsmString, to %%0%% will be replaced by whatever is defined there

-- Result
The innerText is of course available, but I go much further then that
you can access any number of properties
-- attributes ( that is when you define a property starting with "@")
-- innerXml using again XPath, if your property starts with / then it will be processed as an XPath query locally on the selected node ( this is important to be aware of that, because I prepend a "." to make that path be really locale, else it will search from the document root, which is not what we want here)
-- direct child nodes innerText. simply reference the name and its inner Text will be returned

 Your first stop is to read this:
http://msdn.microsoft.com/en-us/library/ms256471.aspx

If you need some of these XPath not yet supported, let me know, the play is to support XPath fully anyway.

 Have fun, Any questions and suggestions or trouble, don't hesitate.

 Jean

kiriri:
awesome, this is just perfect for a laguage system!
However, do you know a way to make editor classes work with this (with PlayMaker in general). It would be amazing to actually be able to create and move files at runtime.

Cheers,
kiriri

Drunkenoodle:
Just had a bit of a tinker with what you've come up with and, man, that is utterly awesome. Great job Jean!

jeanfabre:
Hi,

 I made some progress on this, you can now download a more stable and powerful version on the wiki:

https://hutonggames.fogbugz.com/default.asp?W1133

It's not compatible with previous alpha version tho, but it's for the best :) it's a lot more flexible and gives you raw power!

 Bye,

 Jean

JennaReanne:
First, let me just say that this is AMAZING.  This lets me store all sorts of information and grab it on the fly to generate my levels, I can't imagine how I would do that without this tool.  So a huge thank you!

I was wondering if this is still in development?  I'd love to be able to write to XML files as well.

Thanks Jean!

Navigation

[0] Message Index

[#] Next page

Go to full version