Aditi.av
(Aditi Vaishampayan)
July 10, 2023, 4:01pm
1
Hello,
I am trying to build an xml where I have
xmlTree1 = New XElement(“Root”,
New XElement(“Child1”, 1),
New XElement(“Child2”,2)
)
This works fine and XML is created. I then add
xmlTree1 = xmltree1.Add(new XElement(“NewChild”,555))
Any help is appreciated
Thanks
Aditi
xmlTree1 = New XElement("Root",
New XElement("Child1", 1),
New XElement("Child2", 2)
)
xmlTree1.Add(New XElement("NewChild", 555))
yOU USE xmltree T ismall
postwick
(Paul Ostwick)
July 10, 2023, 5:21pm
3
Are you trying to do this on the right side of an Assign? You can’t do that because xmltree1.Add doesn’t produce a value - it’s just a method that performs an action but doesn’t return a value. For this, you should use Invoke Code instead of Assign.
Aditi.av
(Aditi Vaishampayan)
July 10, 2023, 7:38pm
4
yeah, I changed it still the same error.
Aditi.av
(Aditi Vaishampayan)
July 10, 2023, 7:40pm
5
oh yes, I used it in assign.
@Aditi.av
can you show mw how you are doing?
@Aditi.av
Add Functions return nothing its just adding.
If your problem resolved, please mark it as a solution so that others can get help from it.
system
(system)
Closed
July 13, 2023, 9:16pm
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.