LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XM NameSpace Prefix

Hi,

Is there a way to save an xml file in LabView as below:

 

<?xml version="1.0" encoding="UTF-8"?>
-<Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cmn="urn:abc:mapper:sl:commontypes" xmlns="urn:abc:mapper:sl:s_n_e" xmlns:snx="urn:abc:mapper:sl:s_n_e">
      +<snx:ControlFileHeader>
       -<snx:MessageBody>

 

How to Create Namespaces/Prefixes in the header? How to place prefix before tag for example <snx:ControlFileHeader> ?? Is there any XML library with such implementation / example?

 

I tried but could not get anything similar. below is my version:

 

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

-<xsi:Message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          +<ControlFileHeader>       <=========== snx: missing
           -<MessageBody>

 

Help shall be deeply appreciated.

0 Kudos
Message 1 of 2
(2,545 Views)

Hey,

 

Are you using the Write to XML file VI currently to get your version as shown below? Would you be able to attach a screenshot on how you are implementing this?

 

LabVIEW converts data to an established XML schema. To my understanding you can't control how LabVIEW tags each piece of data. This is referenced in the document "Converting Data to and from XML"  in the LabVIEW XML Schema section here.

Converting Data to and from XML:

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/converting_data_to_and_from_xml/#LabVI...

 

Cici Z.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 2
(2,471 Views)