Have a heck of a time writing XPATH to parse this XML response.

Source data is (removed a bunch to save the innocent:

`<?xml version="1.0" encoding="UTF-8"?><env>

                              <COMPONENT DATATYPE="FLDPARAMINFO" NAME="ACCOUNTINFO">                                          
                                      <FIELD DATATYPE="FLDSTRING" NAME="ServiceType">/service/ip</FIELD>
                                      <FIELD DATATYPE="FLDBOOLEAN" NAME="ReactivationFlag">false</FIELD>`'

XPATH statement is

Which only gets me

Element='<FIELD DATATYPE="FLDSTRING" NAME="ServiceType">/service/ip</FIELD>'

I need to get down to /service/ip

Any ideas?

Recommended Answers

Add /text() to your query.

Jump to Post

All 2 Replies

Add /text() to your query.

Worked like a charm. Thanks for the quick help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.