Forum Discussion

Willa's avatar
Willa
Occasional Contributor
9 years ago
Solved

Unable to get node using XmlHolder

Hi,

How can I access "AccountId" node in the following request using XmlHolder

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
		<Message xmlns="http://www.example.com/schema/message">
			<Header>
				<AccountId>12345763-210b-468b-97ce-18374f8d73a7</AccountId>
			</Header>
		</Message>
	</s:Body>
</s:Envelope>

 

I've tried holder["//AccountId"], but it didn't work

 

Thanks

 

  • Found the solution

     

    holder.getNodeValue("//*:AccountId")

     

2 Replies

  • Willa's avatar
    Willa
    Occasional Contributor

    Found the solution

     

    holder.getNodeValue("//*:AccountId")

     

    • edweerdt's avatar
      edweerdt
      Contributor

      Old but gold. The answer to my problem I've been looking for, for hours. Tnx for coming back and posting the solution.