LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
PrimaryKey

Include Pretty XML parsing for map/set/tree data structure

Status: New

The current implementation of flattening and unflattening from XML is quite noisy and includes information unnecessary for the users. Rewriting it or including Pretty Print functionality to LabVIEW would greatly simplify loading settings, exchange of data with other languages, dynamic configurations, visualizations of complex systems, network communication etc.

 

PrimaryKey_0-1573820513072.png

For community solution and examples of these features please go to -> https://forums.ni.com/t5/LabVIEW-APIs-Discussions/Tree-Map/td-p/3972244

 

This could include also Pretty JSON since XML and JSON are interchangeable -> http://www.utilities-online.info/xmltojson/#.Xc6XjVdKiUk

 

Additionally the XML parsing should be implemented without requiring Windows .NET platform components, so it can be done on a real-time system. Current XML parsing functions cannot be called on RT.

 

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect
2 Comments
McQuillan
Active Participant

I've been using TreeMap and didn't really appreciate the importance of this until I realized how many issues it solved.

 

I originally started using TreeMap because I wanted to use a tree on my user interface. However, after realizing I could add attributes of any data type (flatten to string) I started using TreeMap to save configuration data/references and other objects for a recursive user interface (one with lots of deeply nested subpanels). TreeMap made keeping a track of everything that's happening straightforward. Excluding the run-time objects, I'm saving all the data as an XML string in a DB and it's made configuration so much easier

 

TLDR; I've been having success with it, and adding PrettyXML to the LabVIEW pallet would enhance the experience.

 

NB: Have you seen James Powell's JSON library? In there he has a PrettyJSONColours Function that changes the colours for tags/values (different datatypes have different colours). It would be awesome to have that functionality for XML

AristosQueue (NI)
NI Employee (retired)

> NB: Have you seen James Powell's JSON library?

 

Yes. We started including it in the the LabVIEW palettes in LV2019. Clicking on the palette item installs nir latest JSONText VI package.