From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

XML Parse and Replace LabVIEW 2009

Code and Documents

Attachment

Introduction

This example parses through an XML document for a particular node and then replaces the value of that node with the new value entered by the user.  The user has four nodes to select from (title, author, year, price), and five instances of each node.

Steps to Complete

1.  Open Program

2.  Change the end of the XPath Expression to "title", "author", "year", or "price"

3.  Enter value you would like to change in the "Lookup String we Want to Change" control

4.  Enter the new value in the "String we will Change to" control

5.  Run the Program

Additional Notes

Must have LabVIEW 2009 or later to run

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Doug
Member
Member
on

Nice explanation of the example.  One question though.  How would I search the elememt data?  In this example, element data would be lang="en".

Fianlor
Member
Member
on

Wow! Exactly what I was looking for; thanks for the work! This saved me lots of time.

Contributors