Flying Wiener Dog

Released Books


An Ember in the Wind


A Foundation in Wisdom

Apps


WordMutation (NEW!)


Orbitual


Permutation


Arcade

Fast XML Parsing

The Fast XML Parsing package is an extension for Stencyl development environment. It provides an implementation of the Fast XML parsing extension.

Downloads:       [fast-current.zip]       [fast-current.tar.gz]

Samples:       [sample stencyl export]

General Discussion

Fast makes it easy to read and parse XML files. This extension provides blocks that handle package and variable declarations. All you need to supply are the names of your attributes and nodes.

It is worth reading Parsing and creating XML in Haxe: the Fast way, posted at haxecoder.com. In particular, this document explains essential vocabulary: node, dot notation, innerdata, innerHTML, name, attribute (not to be confused with Stencyl's "attribute").

Note: ETHProductions' External Data Extension provides blocks to load your XML file as a text attribute.

All of these blocks are macros. This extension provides no new classes.

Quick Function Reference

Code                        

   

Description

(wrapper)

 

Primary wrapper. All Fast blocks must be contained in this wrapper. The first field contains the text to be parsed (contents of your xml file). In the second field you specify the name of the root node.

 

 

~.name

 

Returns the name of the specified node as a text attribute.

 

 

~.has.~

 

Returns true if the specified node has the specified attribute.

 

 

~.att.~

 

Returns the contents of the specified attribute as text.

 

 

~.innerData

 

Returns the inner data of the specified node as text.

 

 

~.innerHTML

 

Returns the inner HTML of the specified node as text.

 

 

~.hasNode.~

 

Returns true if the specified node has the specified child node. To access the child node, use dot notation: parent.node.child, where "parent" and "child" are the names of the respective nodes.

 

 

for ~ in ~.elements

 

Loops through all the nodes contained in the parent node.