Chicago LabVIEW User Group

取消
显示结果 
搜索替代 
您的意思是: 

Get data / parse from xml file.

Hi I am new to the LabView... I need help parsing following xml file.

Any one provide me code or walk me through. I will greately appreicate it.

Currently the way i do it providing xml file path via vi and i wants to parse or extract

result of any particular data. my following XML file we can refere to as myXML.xml

Please see attached files. I wants to get value of all_auto_service_enabled...

or I wants to get value of ServiceSettings.

How can i parse it?

下载全部
0 项奖励
1 条消息(共 6 条)
12,618 次查看

Is this xml file generated elsewhere and you are just going to be reading it?

there are a couple differnt ways to approach this, you can use the XML Parser VIs within Labview (look in the File IO Palette>XML>XML Parser) I can work on a couple examples, but what version of LabVIEW are you using?

Another way is to install the VI Package Manager from JKI. they then have a EasyXML package you can tryout, not sure if there is a limit for it, but you can also purchase it. I have found that I use EasyXML for many things although in some cases I still use the XML Parser tools within LabVIEW.

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 项奖励
2 条消息(共 6 条)
7,266 次查看

Hi
Yes the xml file generated elsewhere. I get get that file from there and i need to parse it.

I am using LabView 2010. I tried xml parser from labview but it did not work for me. I am very new to labview. If you can help me or provide me vi which parse my attached file. I will greately

appreciate.

0 项奖励
3 条消息(共 6 条)
7,266 次查看

Here's a link for EasyXML as jdebuhr suggested, it might be the easiest way to read your file's format (which is harder to do with the built in LabVIEW stuff): https://www.ni.com/en/support/downloads/tools-network/download.easyxml-toolkit-for-labview.html

 

Do you have any programming experience in other languages?  If you just want to parse this file with its specific format, you can build a parser in LabVIEW in ways similar to how you can in many other languages (you could do it as simply as string parsing, for example, though this isn't recommended).  But you have to think through what you need and want to do and we can give some advice if you need.  If you want to parse XML files of varying format, or just do it quickly, try out EasyXML.

 

That all said, welcome to LabVIEW.  If you give it enough time to learn, its a brilliant language that can do a lot for you.

0 项奖励
4 条消息(共 6 条)
7,266 次查看

Sorry I did not have any time this weekend to look it over.

Have you given it a try yet using what Joseph suggested?

Jeff

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 项奖励
5 条消息(共 6 条)
7,266 次查看

Hi jdebuhr,

Thanks for asking. NO i tried different way. I use "Read from Text File" and than parse

required string via Match Pattern. Thanks you guys...I learn some more now.

0 项奖励
6 条消息(共 6 条)
7,266 次查看