user piyush
piyush (1)

simple xml utility

Hi all
this example shows a customized simple XML utility function (getXMLFromPath(src:XML,path:String)) which allows coders to extrat xml nodes in simple xpath('/') syntax.
This function can be used in getting data from configuration xml files in gaming or such applications.

In the example below we are loading a file named test.xml and extracting its nodes in xpath manner

flash version :...
more >
1947 downloads, 24080 views


Download (144.36 KB)

Comments

You need to login to post a comment.

user sirisha5781
sirisha5781 9 years ago

Hi,
nice work
I have a doubt regarding xml when we click a button the color of the bitmap will be changed according to the values in the xml file.Is it possible.
I got it in flash but i need to load the values using xml file.

user superchinois
superchinois 1 decade ago

nice work :)
but have you the same to edit the xml :)

user piyush
the listing author piyush 1 decade ago

nite21:

yup
unmatched paths will lead to the whole xml data

user nite21
nite21 1 decade ago

when i put wrong data in XML path and click show data it shows me test.xml in the resultpane

user piyush
the listing author piyush 1 decade ago

nite21
regarding wrong file name:
are you testing it in local or from web(ffiles) ?
ok wherever u test remember when you press load then the respective xml file is loaded and shown in text area.
if file path is wrong then mo result is shown in text area
and if u co through code i have made a unused condition in my code to know whether the file is loades sucessfully or not !!

regarding scrollbar :
scrollbar is used to see long xml files which extend the text area after load.

show all 10 comments