/    Sign up×
Community /Pin to ProfileBookmark

Access XML elements in Firefox

Hi!

How can I get access to element names and element values of the following xml:

<response>
<total>5</total>
<user>
<nickname/>
<email/>
<status/>
<country/>
<lng/>
<lat/>
</user>

</response>

I get it well as DOM object: xmlObj as .responseXML from web-service.
What I need is to fill 2 dimesnisal array : users[1][0] = [usernickname], users[2][0] = [usernickname] (of second user) etc.

Thanks in advance

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 11.2006 — You'd be best getting an answer for this in the forum for the language in which you wish to build and use this array. It looks to me like it's not the XML you have a problem with, but rather with whatever language you're using to manipulate the XML data.

If you're naming a specific browser, then I'm guessing it's a Javascript problem. Would you like me to move it there?
Copy linkTweet thisAlerts:
@f0rzaauthorJul 11.2006 — no thank you, may be i was wrong in exact wording. But main idea of the question is how to get element value (innerText) in FireFox through Javascript:

if we have [<response><user>CoolUser</user></response>]

variable have to be

var myVal = 'CoolUser'


If you think i confuse forums, please move there ? Thanks.
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 12.2006 — Yes. You'll get much better information from the Javascript forum. I'll move it to there.
×

Success!

Help @f0rza 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 5.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...