Hello,
Is there a way to create programmatic element names i.e. element names defined at run time not edit time.
For example I have data that I want to associate to it's location i.e. station 1, station 2, etc. I only know how many stations I have at run time.
I would like the stations to appear as columns in an xml table in excel. The way I think to do this is to define element names at run time.
I think I need something like the following.
<Current_Data>
<Station_1>1</Station_1>
<Station_2>2</Station_2>
<Station_3>3</Station_3>
<Station_4>4</Station_4>
<Station_5>5</Station_5>
The number of stations are unknown and they may not be sequential.
Any help would be appreciated.
Thanks
Dan
JKI Discussion Forums
Page 1 of 1
Programitc Element names
#2
Posted 27 July 2011 - 06:25 PM
ASTDan, on 27 July 2011 - 06:06 PM, said:
Hello,
Is there a way to create programmatic element names i.e. element names defined at run time not edit time.
For example I have data that I want to associate to it's location i.e. station 1, station 2, etc. I only know how many stations I have at run time.
I would like the stations to appear as columns in an xml table in excel. The way I think to do this is to define element names at run time.
I think I need something like the following.
<Current_Data>
<Station_1>1</Station_1>
<Station_2>2</Station_2>
<Station_3>3</Station_3>
<Station_4>4</Station_4>
<Station_5>5</Station_5>
The number of stations are unknown and they may not be sequential.
Any help would be appreciated.
Thanks
Dan
Is there a way to create programmatic element names i.e. element names defined at run time not edit time.
For example I have data that I want to associate to it's location i.e. station 1, station 2, etc. I only know how many stations I have at run time.
I would like the stations to appear as columns in an xml table in excel. The way I think to do this is to define element names at run time.
I think I need something like the following.
<Current_Data>
<Station_1>1</Station_1>
<Station_2>2</Station_2>
<Station_3>3</Station_3>
<Station_4>4</Station_4>
<Station_5>5</Station_5>
The number of stations are unknown and they may not be sequential.
Any help would be appreciated.
Thanks
Dan
Hey Dan,
What are the requirements (in terms of XML data structure) of an Excel XML Table?
Also, there are a few ways to represent ordered arrays of data. Here's one way to do it (using an attribute to store the station number):
<Current_Data Station="1">1</Current_Data>
<Current_Data Station="2">2</Current_Data>
<Current_Data Station="3">3</Current_Data>
If you really want to use the exact XML schema you showed, then you'll need to use a Variant representation of your cluster and construct its elements and their names dynamically (e.g. using the OpenG LabVIEW Data Tools library for variant manipulation).
-Jim
#3
Posted 27 July 2011 - 07:13 PM
Jim Kring, on 27 July 2011 - 06:25 PM, said:
Hey Dan,
What are the requirements (in terms of XML data structure) of an Excel XML Table?
Also, there are a few ways to represent ordered arrays of data. Here's one way to do it (using an attribute to store the station number):
<Current_Data Station="1">1</Current_Data>
<Current_Data Station="2">2</Current_Data>
<Current_Data Station="3">3</Current_Data>
If you really want to use the exact XML schema you showed, then you'll need to use a Variant representation of your cluster and construct its elements and their names dynamically (e.g. using the OpenG LabVIEW Data Tools library for variant manipulation).
-Jim
What are the requirements (in terms of XML data structure) of an Excel XML Table?
Also, there are a few ways to represent ordered arrays of data. Here's one way to do it (using an attribute to store the station number):
<Current_Data Station="1">1</Current_Data>
<Current_Data Station="2">2</Current_Data>
<Current_Data Station="3">3</Current_Data>
If you really want to use the exact XML schema you showed, then you'll need to use a Variant representation of your cluster and construct its elements and their names dynamically (e.g. using the OpenG LabVIEW Data Tools library for variant manipulation).
-Jim
Thanks for the Reply Jim,
The requirements are I want my customer to use XML because I think they need it. They want a file that looks warm and fuzzy in excel, because excel is all they know. Down the road when they have 80 gazillion xml files, porting the xml data to data base will be a snap (which I think would be cool). I am trying to figure out a data structure using the Easy XML toolkit that would satisfy both wayward engineers.
I tried the attribute. Cool, but didn't quite work.
How do I make Variant representation of cluster and construct its elements and their names dynamically? I have the OpenG LabVIEW Data tools Library. What functions would allow me to do this?
Thanks
Dan
#4
Posted 27 July 2011 - 08:10 PM
Share this topic:
Page 1 of 1



Back to top








