Hi All,
My xml file is like this:
-
I want to add a new node (ok ) to where ID= 2
my xpath is: note/step[ID='2']/to/
final result should be like this in xml file:
Thanks
Darma
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 2:46 AM EDT
Regards,
Iftikar
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 28, 2013, 7:34 AM EDT
Try like this
Regards,
Iftikar
VulpesRank #55 · 29.2K reputationPosted Aug 28, 2013, 1:04 PM EDT
darma tejaRank #3,199 · 449 reputationPosted Aug 29, 2013, 12:35 AM EDT
Thanks allot!
It works fine. If i have two same id's, It does not work for me.
here is sample xml file:
darma tejaRank #3,199 · 449 reputationPosted Aug 29, 2013, 12:37 AM EDT
Thanks allot!
It works well. If i have more than i node, It does not work for me.
Here is the sample xml file:
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 1:25 AM EDT
Regards,
Iftikar
darma tejaRank #3,199 · 449 reputationPosted Aug 29, 2013, 2:41 AM EDT
Thanks for the reply.
I wanted to insert it in both nodes.
thanks,
Darma
VulpesRank #55 · 29.2K reputationPosted Aug 29, 2013, 3:05 AM EDT
darma tejaRank #3,199 · 449 reputationPosted Aug 29, 2013, 3:15 AM EDT
It is working well now with both of you solutions.
Is there any possibility to select "This is correct answer." for both of your solutions?
Thanks
Darma
VulpesRank #55 · 29.2K reputationPosted Aug 29, 2013, 3:20 AM EDT
But give it to Iftikar as he gave his correct answer first :)
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 3:24 AM EDT