From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to parse all the data of the particular tag in the xml file

Solved!
Go to solution

Hi All,

 

I have a xml file, which have tags like, code,rev_num,type...volunteer.I want to parse the xml and save the all data(code,rev_num...) of the tag <type>unknown </type>in a text file. I tried to use a Match node vi but I not geting the output i need.attach is my attempt , can anyone suggest me or help me out.(Sorry Cant attach the xml hence i saved it as an text file.)

 

Thanks,

 

Ankit G

Download All
0 Kudos
Message 1 of 6
(2,318 Views)

Do you want to extract all the data with type='unknown'?

 

Then try the XPath like this: 

 

resource[type='unknown']/code

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 2 of 6
(2,303 Views)

@TailOfGon wrote:

Do you want to extract all the data with type='unknown'?

 

Then try the XPath like this: 

 

resource[type='unknown']/code


Hi,

 

Yes I want to extract all the data of the type = "unknown", I tried Xpath resource[type='unknown']/code but it didnt work , I still getting all other data of different type .

 

Thanks,

 

Ankit G

 

0 Kudos
Message 3 of 6
(2,291 Views)
Solution
Accepted by topic author AnkitG

You need to replace all instance of "resource" with "resource[type='unknown']". Did you do it?

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 4 of 6
(2,289 Views)

@TailOfGon wrote:

You need to replace all instance of "resource" with "resource[type='unknown']". Did you do it?


Hi,

 

Thanks a lot changing all instance of "resource" with "resource[type='unknown'] did work.

 

Ankit G

 

0 Kudos
Message 5 of 6
(2,283 Views)

Glad it worked! 

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 6 of 6
(2,275 Views)