LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML assign name to a string

Hi All,
 
In my application I need to save some data into a file, using XML functions. I created my own string containing the date (as "03/05/2006, 04:25 PM") using Get Date/Time String and Concatenate Strings and I sent the result to Flatten to XML. The value is saved in the XML file, but the <Name> tag is left blank. How can I assign a value for the Name tag?
 
Regards,
Nick
0 Kudos
Message 1 of 4
(3,034 Views)

Nick

This seems to work. I have used the typecast function to inherit the "Date And Time" label property which then fills out the tag Name for you.

David

Message Edited by David Crawford on 09-04-2006 09:43 AM

Message 2 of 4
(3,017 Views)

Hi David,

Thanks for help.

Hmmm, very strange. I added the Type Cast function in between, I set up its Label, made it visible and still the string is missing the <Name> tag. Whag version of Labview are you using? I am using Labview 8.01 or so. I attach in here my project, maybe you can notice a difference between this one and yours.

Regards,

Nick

0 Kudos
Message 3 of 4
(2,989 Views)

Nick

You have made the label for the typecast function visible which isn't what you need. You need to wire a string constant to the middle terminal (type) of the typecast function. To do this

1 Right click on the middle terminal then select Create -> Constant which should give you a string constant wired to the type terrninal.

2 Right click on the new string constant then select Visible Items -> Label.

3 Rename the string constant label to whatever you want the name tag to be.

David

0 Kudos
Message 4 of 4
(2,975 Views)