Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference Library for Converting Between LabVIEW and XML Data (GXML)

Wasn't as hard as I thought.  I modified two VIs in GXML Search Parser to output the "remaining XML string" (which they already produced, just didn't bring it to a connector), and added a helper VI, gxml_AllowMissingTags, that checks if error 537525, Missing Opening Tag, is present, and if so, it clears the Error line and returns Booleans.  I ended up returning both Tag Present (used in conjunction with a Conditional Tunnel to exclude the non-existent "Missing Data") and Tag Missing (wired to the While Loop's Stop Terminal).  I realize I could do this with a single Boolean, particularly if I use a "Continue" instead of a "Stop" on my While loops, but I'm a Slave to Consistency ...

 

Anyway, in conjunction with my Action Engine described a few posts above, I'm now able to write XML files in an on-going, "piece-meal" fashion, including having multiple elements at the same hierarchical level with the same name, and using the above Search Parse function inside a While Loop with the remaining XML string in a Shift Register, guarded by AllowMissingTags, to get all of the XML data back.

 

What a joy to work with GXML!  I'm happy to contribute my ideas, particularly if they show up as a revised VIPM Package (much easier to install, and VIPM is now part of LabVIEW 2013).

 

Bob Schor

Message 81 of 132
(5,441 Views)

Oops, made a stupid (but subtle!) mistake in my modified gxml_NameFilter.  I was trying to remove name characters that were not alphanumeric, period, hyphen, or underscore.  I'd replaced a "Match Pattern" function with the regular expression [^a-zA-Z0-9.-_], used to find the existence of an illegal character, with a "Search and Replace" VI (with Regular Expression turned on) using the same regular expression.  However, these two VIs treat the period differently, as I found when the string "Date/Time" made it through without removing the slash, only to be "caught" with the slash as an illegal character.

 

I made two changes.  First, I decided that instead of removing the slash, I'd replace it with hyphen (giving "Date-Time").  I also fixed the regular expression by putting the period as the last character (I'm not 100% why this works, but it does).

 

Here's the "better" Name Filter.

 

BS

 

gxml_NameFilter.png

Message 82 of 132
(5,425 Views)

With the newly released GXML ver 1.4.1.6.(Sep 11, 2013), since GXML is required by the Structured Error Handler (SEH) and must be installed prior to installing SEH http://digital.ni.com/public.nsf/allkb/15A83EAE41E2F46F862579FE00388806.

If I want to upgrade GXML, because of the sequential install requirement, must I

  1. uninstall SEH ?
  2. upgrade GXML
  3. reinstall SEH
0 Kudos
Message 83 of 132
(5,372 Views)

I would try installing GXML before SEH.  Here is the correct link to the Structured Error Handler:

http://zone.ni.com/devzone/cda/epd/p/id/6253


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 84 of 132
(5,362 Views)

I cannot find the latest GXML Library (1.4.1.6).  I asked VIPM to refresh its package base, and also looked through the LabVIEW Tools Network (which showed me 184 items, none of which seemed to be GXML, though I confess to not looking at every single one, but none started with "GXML" and none starting with "NI" or "National Instruments" were GXML.

 

I'd greatly appreciate help here ...

 

Bob Schor

0 Kudos
Message 85 of 132
(5,356 Views)

Bob,

 

GXML is available on the NI LabVIEW Tools Network repository which is automatically scanned by VIPM.

 

It is compatible with LabVIEW 2010 and later, so if your VIPM is set to an earlier version of LabVIEW, GXML will not show up in the list of available packages to install.

 

Also make sure you have the latest version of VIPM (version 2013) installed.

 

Searching the LabVIEW Tools Network website will not show GXML as we have not created an entry for GXML in that database so far, but it is available directly through VIPM.

 

 

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 86 of 132
(5,336 Views)

If that does not work there are links to the package from the GXML dev zone document.

 

http://zone.ni.com/devzone/cda/epd/p/id/6330

 

Under the "Downloads" section there is an "Install Toolkit" link that will automatically launch VIPM and install GXML and an "Alternative Download" link that will take you to the ftp site where you can download the package manually.

 

Regards,

 

Jeff Tipps

NI Systems Engineer

0 Kudos
Message 87 of 132
(5,329 Views)

Thanks, Jeff.  I installed it from the VIPC, and noticed it has "moved" from user.lib to vi.lib.  Also, the GXML Palette that used to be in User Libraries is now gone.  Has it appeared somewhere else?  [I did notice a .mnu file flashing by during the installation, so I assume it is somewhere].

 

I've made a few minor tweaks to the previous set of GXML files (some of which have been described here).  I'd like to write these up and present my ideas somewhere, possibly for inclusion in a future release.  How would you suggest I do this?  I'm thinking of a PDF file (possibly several pages long) discussing my ideas and how I've implemented them, and why, possibly along with "pictures of code" (e.g. pasted snippets).

 

Bob Schor

0 Kudos
Message 88 of 132
(5,318 Views)

Bob,

 

The pallettes are now accessible from the "Addons" subpallette.  I am the owner of GXML and would love to take a look at your suggestions.  A pdf file would be fine please post that here.  SE libraries are not updated on a regular development cycle like products are but they do get updated on an as-needed basis and I would definitely take your ideas into consideration.

 

Best Regards,

 

Jeff Tipps

NI Systems Engineer

0 Kudos
Message 89 of 132
(5,314 Views)

Jeff,

 

Is there a changelog somewhere of what is different in the latest version?

 

Thanks,

 

Mike

0 Kudos
Message 90 of 132
(5,300 Views)