LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Article - Using XML Data in LabVIEW Just Got Easier

[cross-post]

7 out of 10 LabVIEW developers polled think that using XML data in LabVIEW is too difficult. Here's another Thinking in G article with a possible solution:I hope you enjoy the article smile.gif

Thanks,

-Jim
Message 1 of 13
(6,377 Views)

Jim,

That is a great idea to make a tool like this.  Too bad it cost $40...I think I'll stick to parsing HTML.  SS



0 Kudos
Message 2 of 13
(6,348 Views)
Of course you can still do the parsing "manually" in LV and create a different parser for every single xml document that you need to parse (we all have been there). JKI Software made this toolkit so people did not have to do that anymore.

On your example, you parse the page title (as seen below).




Here is another example using EasyXML that parse an entire rss feed (see image below).



Having the capability to parse arbitrary XML file is pretty usefull and I think that the EasyXML toolkit will pay for itself very quiclky.

By the way, do you know that you can try it for free?

Regards

PJM


Message Edited by PJM_Labview on 03-02-2008 09:56 AM

Message Edited by PJM_Labview on 03-02-2008 09:56 AM

Message Edited by PJM_Labview on 03-02-2008 09:57 AM

Message Edited by PJM_Labview on 03-02-2008 09:59 AM


  


vipm.io | jki.net

Download All
0 Kudos
Message 3 of 13
(6,323 Views)


@ShotSimon wrote:

Jim,

That is a great idea to make a tool like this.  Too bad it cost $40...I think I'll stick to parsing HTML.  SS




If you have something very easy to parse, you can certainly do it as you have demonstrated.  But be careful, as there are hidden pitfalls to quick and dirty solutions, as I mentioned in my article: Using XML Data in LabVIEW is Hard.  Using a well designed and fully tested tool that is built specifically for the job at hand is almost always a better choice than creating your own custom solution.  And, $40 is almost nothing compared to the cost of most commercial LabVIEW tools or the cost of the time you'd spend writing something with similar capabilities.

Regards,

-Jim
Message 4 of 13
(6,282 Views)
Jim,

Is this using MS DOM underneath, or is it pure LabVIEW? Or, on what targets
will it work?

For those interested: We are about to release a (open source, probably LGPL)
XML parser made in native LabVIEW. I created it (when I was very bored) as a
study project. However, this parser is not meant to be easy, but is intended
to be a complete DOM parser (like the MS activex xml parser). Like you said,
the DOM isn't easy...

Regards,

Wiebe.


0 Kudos
Message 5 of 13
(6,200 Views)
Hi Weibe,

EasyXML is written purely in LabVIEW and uses a very light-weight xml parsing scheme, under the hood.

I'm looking forward to seeing your XML parser, once it's available.  As you might know, I prefer BSD over LGPL for open source LabVIEW libraries (since most LabVIEW users need the flexibility of the BSD license), but you have the right to choose whichever meets your own requirements.

Thanks,

-JIm
0 Kudos
Message 6 of 13
(6,180 Views)
Wiebe,

First, sorry about misspelling your name in my last post 🙂

Second, I've heard some other OpenG/LAVA people talking about a pure LabVIEW DOM parser.  Perhaps this would make a nice OpenG project.  If your intrested in collaborating with others on this, I'm sure there are some people who would want to help.

Cheers,

-Jim
0 Kudos
Message 7 of 13
(6,164 Views)
Don't worry about the name, somehow spelled the wrong way it makes more
sence to most people.

The BSD licence might be better since LGPL makes software that "statically
links" with the library becomes LGPL as well. Pretty unconvenient when it
comes to LabVIEW. I've to look into the BSD license.

I'll put the parser on our webside in a few weeks. I guess I just sit and
wait untill someone shows interrest? I have no clue where or how to begin an
openg project or what it involves.

I wouldn't mind teaming up with others. The parser does need work (mostly on
document entities, external references, litterals and other more exotic xml
stuff, since I have no idea how they should work), and I don't have a lot of
time.

Regards,

Wiebe.


0 Kudos
Message 8 of 13
(6,146 Views)
Wiebe,

Let me know if you have any questions about BSD or OpenG and let us know when you've publicly posted your code.

Thanks,

-Jim
0 Kudos
Message 9 of 13
(6,102 Views)
Jim,

I do like to know how to get started with an OpenG project, and what to
expect of it. My experience with OpenG is limited to downloading stuff
that's there... Do I need to learn new SCC or CMS packages? Is there any
tutorial about this?

Thanks,

Wiebe.


0 Kudos
Message 10 of 13
(6,029 Views)