LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

replacing xml child

Solved!
Go to solution

I am having troubles replacing xml child inside XML document (below). In order to modify the xml node value, do I really need to replace the child  or there is a way to modify the xml node value ?

 

Download All
0 Kudos
Message 1 of 3
(4,159 Views)
Solution
Accepted by topic author dotan
It appears that you are actually just trying to change the attribute of a node. If so, you can simply get the reference for the attribute and set its value, as shown in the attached example.
Message 2 of 3
(4,146 Views)

More importantly, you can't create an element using its full XPath. The Tag Name of an element is precisely the text inside the < and >, so you tried to create an element that looked like </TimerScript/Sch...> which is probably not what you wanted. I don't think it's legal XML either.

 

What you needed to do was to create an element with the Tag Name of Delay, then get a reference to /TimerScript/.../CAM60 , then tell CAM60 to add the new Delay element as a child.

 

I know this is long dead, but someone else may come across it sometime and wonder.

 

~Chris

0 Kudos
Message 3 of 3
(3,754 Views)