05-22-2012 11:33 AM
I think my approach to "un-concantination" was the search parser. I can see this VI being useful however when you need to use the quick parser.
Jeff Tipps - S&V Systems Engineer
06-26-2012 02:48 PM
Jeff thank you for this work it is way way better than the default Unflatten From XML and Flatten To XML, looks very usable, it seems faster and generates smaller better readable XML files.
I applied a few patches and fixes to the 1.4.0 library, may be useful for others too. See attachment LabVIEW 2010, you can just put it somewhere in your project directory. Note strange things may happen if you have the GXML library installed with the official installer in parallel...
Timestamp issue, see message of mq17. Changes to be made:
replace time stamp format string
So the date format is now stored in UTC (time zone independent), no longer dependent of your local settings and has 12 digits precision so you can put nanosecond accurate time stamps in XML files (need that in my application). New time stamps look like "2012-06-26 18:02:23.625000000000" for today.
It is still not perfect, as far as I understand you cannot lossless convert the LabVIEW timestamp format to a string.
Also apply following change to
change regular expression
to match the new time format.
Path data type issue.
If a Path occurs on the input data with value Not A Path, this is not converted to Not A Path on the output, instead to a valid path with path value "<Not A Path>". This is a limitation of the String To Path primitive. Easy fix this by drawing a case structure around it, see snippets. You need to change this in
Decimal point issue, see post of mq17 too.
To get correct operation with different locals, always use the "." as decimal separator.
Jeff, what about a version 1.4.1?
06-27-2012 03:34 AM
Solved a bug in the quick parser. Compare the "Path" case in gxml_BlindXMLtoFlatString.vi to gxml_BlindXMLtoFlatString.vi. In gxml_BlindXMLtoFlatString.vi the call to the XML unescape VI gxml_UnescapeChar.vi is forgotten.
Example: without fixing, Quick Parser returns "<Not A Path>" instead of a real "<Not A Path>".
08-02-2012 04:15 PM
Today, I ran into a little issue in combining GXML with the LabVIEW XML Parser.
The case: I'm storing fragments of GXML-generated XML in a larger XML file. This allows me to keep all sorts of settings together in one XML file, while still having the convenience of using GXML for parsing most of the XML. (If that's a silly thing to do, I'd be open for suggestions).
In any case, if you try to do this using a combination of GXML and LabVIEW's XML Parser, you will run into an issue. The Parser will automatically pretty-print GXML-generated code like this:
and store it as:
If you now try to parse back the XML using GXML, GXML will give an error.
The attached "gxml_GetTagContents.vi" has been modified so GXML can deal with such short-form XML tags.
If you have any questions about this patch, feel free to contact me. Use at your own risk
10-16-2012 01:57 PM
I tried unsuccessfully to remove your GXML.lvlib dependency (even selected Remove when prompted). Would you mind posting an unmangled version of your gxml_GetTagContents.vi?
10-24-2012 06:43 AM
Does the attached version solve the issue?
10-24-2012 02:50 PM
Yes, thank you Onno. Aside: It would be great if NI would update the official version for some of the bug fixes / additions / suggestions here and port the Windows installer to a VIP.
01-16-2013 04:11 AM
For my Win development I'm currently using LV funtions 'Un/Flatten to XML' (that can be found on the palette File IO -> XML -> LV Schema).
It really looks like it does the same job than GXML library.
What are the difference between GXML and 'Un/Flatten to XML' functions ? Is GXML better on RT targets?
01-16-2013 10:25 AM
The native LabVIEW XML functions are significantly faster than GXML. That is its main advantage however it is not officially tested or supported in RT. I know it has been used succesfully in some applications but it is not supported or even shown on the RT palette.
GXML supports versioning (which allows you to mutate older files to newer type defs) and it is supported in RT. The serach parser can be pretty slow but the quick parser can unflatten very large and complex files in under a second. It also has other differences like the ability to concatinate multiple type defs into one file and it is significantly more terse. GXML has one tag per data item while the LabVIEW function has many tags per data item.
S&V Systems Engineer
02-05-2013 09:28 AM
I tried twice, dwonloading and installing in Windows 7, but each time, Windows Explorer crashed when I tried to run the installer, Setup.exe.
This is a bit of a problem. Would appreciate any help.