Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Not getting xml data on creation of second instance

KayLoehmann
Product and Topic Expert
Product and Topic Expert
0 Likes
843

I'm creating xml objects in a loop with:

CREATE OBJECT xml_doc.

xml_doc->parse_string( stream = g_filecontent ).

and release it with

xml_doc->Delete( ).

At the first run, i can reach single notes without a problem with the following code.

node = xml_doc->find_node( name = 'kvg' root = root ).

value = xml_doc->get_node_attribute( name = 'patient_id' node = node ).

After the first loop finishes, i create another object with another xml string.

Now i cannot reach any notes anymore! Has somebody any ideas what could go wrong?

Greetings Kay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
624

Just a guess ...

node = xml_doc->find_node( name = 'kvg' root = root ).

value = xml_doc->get_node_attribute( name = 'patient_id' node = node ).

would it make a difference if you make 'kvg' as 'KVG' and 'patient_id' as 'PATIENT_ID'?

Are you not able to debug it ?

Message was edited by: Ram Manohar Tiwari

4 REPLIES 4
Read only

Former Member
0 Likes
625

Just a guess ...

node = xml_doc->find_node( name = 'kvg' root = root ).

value = xml_doc->get_node_attribute( name = 'patient_id' node = node ).

would it make a difference if you make 'kvg' as 'KVG' and 'patient_id' as 'PATIENT_ID'?

Are you not able to debug it ?

Message was edited by: Ram Manohar Tiwari

Read only

KayLoehmann
Product and Topic Expert
Product and Topic Expert
0 Likes
624

Hi, thanks for the quick response. This cannot be the problem, because on the first run it works fine! How can i release the XML Document?

Read only

0 Likes
624

I don't understand what do you mean by release but are you sure you want to delete the document or just want to free the memory inside the program.

in that case use method FREE and not DELETE.

Thanks,

Ram

Message was edited by: Ram Manohar Tiwari

Read only

KayLoehmann
Product and Topic Expert
Product and Topic Expert
0 Likes
624

Hi Ram,

thanks for your help. I dont know what it was. but xml_doc->free (). helped.

Greetings Kay.