Use Labview to load and parse XML files (in the form of strings)

tags: labview  xml  String cluster structure

Labview parses the XML file

1. For simple XML file parsing, Labview's own XML file parser can be used to implement;
2. It is more difficult to implement custom or attribute node xml, and the order of XML nodes in the written parsing program cannot be changed, otherwise it cannot be parsed

Here is a way of thinking, using the file reading function or the loading xml string function to load the xml into memory (obtain it as an XML string), then match and parse the string, and finally output to a custom cluster structure
This cluster can be used wherever the xml string is used by the program in the future.
Simple steps:
1. Load XML to string control (memory);

2. Define a custom cluster structure for the xml structure;
  
3. Key VI (find element), match xml string according to <></>
4. Test project directory (For related processing methods, please refer to C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\Utility\xml.lib<toolkit provided by Labview, and the solution ideas come from here>)

Intelligent Recommendation

Use XMLPullParser to parse XML strings or input streams

2019 Unicorn Enterprise Heavy Glour Recruitment Python Engineer Standard >>> XmlpullParser can parse input streams and strings: This is the file to be parsed. Funded in: https: //my.oschina.n...

Four methods take you to parse xml files and xml strings

The first type: Dom4j analysis advantage 1. It is an intelligent branch of JDom that incorporates many functions beyond the basic XML document representation. 2. Dom4j uses interfaces and abstract bas...

Use python to parse xml files into html files

The function is as mentioned in the title, my python2.7 is installed in the windows environment, and the development tool I use is wingide 6.0 1 First is a simple xml file I designed, which is the sou...

Use Dom4j's xPath to parse xml files in java

1. Basic concepts 1. XPath is based on the XML tree structure and provides the ability to find nodes in the data structure tree. XPath is the XML Path Language, which is a language used to determine t...

Use Dom, Sax, Pull to parse xml files

Recently, I was looking for a job and saw that many companies' requirements stated that XML parsing was required, so I reviewed the previous XML parsing knowledge and wrote a small example. Several co...

More Recommendation

Use PHP to parse large XML files

If you use PHP to parse XML, the common choices are as follows:DOM、SimpleXML、XMLReader. If you want to parse a large XML file, the first thing to exclude is DOM, because when using DOM, you need to lo...

Use JDOM to parse XML files (JDOM parsing)

First, download a JDOM jar package, choose one of the following two websites, select the appropriate version and download it and import the project Download URL of jar package: http://mvnrepository.co...

Use SAX to parse XML files (SAX parsing)

First, my XML file is named a.xml, and the path is in the project directory.The content is as follows: The implementation code is as follows: The effect is as follows:...

Android: Use xstream to parse xml files

I. Introduction There are many articles using xstream to parse xml files on the Internet, and I have referenced a lot of them. First of all, I would like to express my gratitude to these apes who sile...

Use tinyxml to create and parse XML files

Create and read the following xml file: Code:...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top