Example Code

LabVIEW XML Example

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
The example is to do XML Nesting using LabVIEW Native XML

Description:
Within this page, there are two provided examples of operating with the XML using the LabVIEW functions such as Nesting

Instructions:
To implement this example:

  1. Run the VI
  2. (Optional) Turn on the Highlight Execution to see the flow of the VI

To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

fp.PNGbd.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Joe Daily
National Instruments
Applications Engineer

may the G be with you ....

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

Comments
kdmcmullan
Member
Member
on

Example 1 generates the following XML. Is that working correctly?

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FLL>

  <Event EventName="EventOne">
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
    <Team>
      <TeamNumber>2859</TeamNumber>
      <TeamName>BlasterBots</TeamName>
      <TeamLocation>Golden, CO</TeamLocation>
      <TeamMotto>Hellva Engineer</TeamMotto>
    </Team>
  </Event>

</FLL>

Roberto_Sobrino
Member
Member
on

Un buen ejemplo para ayudar a entender el manejo de los Invoke Node en los XML.

Ajay_MV
Active Participant
Active Participant
on

Hi JoeD,

Thanks for the example.  I need a common usage suggestion here.  How good is it to use XML for data logging or event logging?  My data/event logs about 1000 rows per minute.  Compared to normal CSV file, is XML better?  What are tradeoffs between them?

--

Thanks,

Ajay.

--
Ajay MV


paulneuda
Member
Member
on

Hi what to use to generate like this <?xml version="1.0" encoding="ISO-8859-1"?> instead of <?xml version="1.0" encoding="UTF-8" standalone="no" ?>?

Thanks

samihamid
Member
Member
on
Hi, I want to edit Above Example "Example 1" , How can i edit it ? i want add my own xml format