/    Sign up×
Community /Pin to ProfileBookmark

Reading xml file

how do I loop this xml file and get each name & data node values? Another set of ‘part’ may also repeat.

<?xml version=”1.0″ encoding=”utf-8″ ?>
<myxml ver=”1.0″>
<part name=”green”>
<color>
<name>data1</name>
<data>data2</data>
</color>
<color>
<name>data3</name>
<data>data4</data>
</color>
<color>
<name>data5</name>
<data>data6</data>
</color>
</part>
</myxml>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@mathursrishtiJul 23.2008 — Using C# we can very easily read the xml file in question using the method

"DataSet.ReadXML"

http://msdn.microsoft.com/en-us/library/system.data.dataset.readxml.aspx
Copy linkTweet thisAlerts:
@rnd_meJul 23.2008 — firefox allow e4x: xmlOb..name
×

Success!

Help @skp0608 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...