xml to variable
Binu
Junior Member
Hi
I am trying to store a xml string from my buffer to a structure by using xml_to_variable
But I could not, can some one help
struct _address
{
char name [30]
char email_id[100]
char place [100]
char age [3]
}
define_variable
_address address [20]
and in my button_event
push:
{
Value = XML_TO_VARIABLE (address, server_buffer, 1, 0)
}
The data in my buffer looks like
<address1>
<name1>bravo</name1>
<emaid1>sss@dddf.com</emailid1>
<place1>gdrkdr</place1>
<age1>44</age1>
</address1>
<address2>
<name2>bravo</name2>
<emaid2>sss@dddf.com</emailid2>
<place2>gdrkdr</place2>
<age2>44</age2>
</address2>
I am trying to store a xml string from my buffer to a structure by using xml_to_variable
But I could not, can some one help
struct _address
{
char name [30]
char email_id[100]
char place [100]
char age [3]
}
define_variable
_address address [20]
and in my button_event
push:
{
Value = XML_TO_VARIABLE (address, server_buffer, 1, 0)
}
The data in my buffer looks like
<address1>
<name1>bravo</name1>
<emaid1>sss@dddf.com</emailid1>
<place1>gdrkdr</place1>
<age1>44</age1>
</address1>
<address2>
<name2>bravo</name2>
<emaid2>sss@dddf.com</emailid2>
<place2>gdrkdr</place2>
<age2>44</age2>
</address2>
Comments
-
I would first do a VARIABLE_TO_XML on your structure to see the format that it creates and then use that XML file to enter your data in the proper fields. Then do the XML_TO_VARIABLE to then load the data into your structure.
Download XMLPad which is a nice little app. for XML viewing and data manipulation.
I don't believe you can't arbitrarily create your onw XML format and expect this function to know how to handle it. -
vining wrote:I don't believe you can't arbitrarily create your onw XML format and expect this function to know how to handle it.
You can't change the structure of the XML file but you can load data offline in to an XML file and then have Netlinx load that data on an event.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
