0

I'm sorry I don't even know the proper names of what I need. I apologize for that.

In PowerShell, I can do the following to specify what data I want to extract from XML:

$participantID in $getParticipantListResponseXml.RESPONSE_TRANS_CONF.ACTION.GET.CONFERENCE.ONGOING_PARTY_LIST.ONGOING_PARTY.PARTY.ID

I can't just do in JavaScript:

getElementsByTagName('ID')

Because 'ID'comes up in more than one place, and I need to specify the exact path. How could I do that?

1
  • What DOM library are you using? Commented Mar 21, 2018 at 15:42

1 Answer 1

1

This could help

document.evaluate( expression, document, null, XPathResult.ANY_TYPE, null );

Example

document.evaluate( '//p', document, null, XPathResult.ANY_TYPE, null );
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.