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,350 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,335 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,323 Views)
Solution
Accepted by 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,321 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,315 Views)

Glad it worked! 

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