Worked a treat, thanks very much
Naz
Curtis Zarger wrote:
Naz,
Have you tried to remove the '<' and '>' characters, replacing them with
< and >?
<xmlpoke
file="file.xml"
xpath="/A/B"
value="<C>Some text</C>" />
Curt Zarger
-----Original Message-----
From: Naz Quadri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 8:31 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Trying to add a node using xmlpoke
Hi guys,
I have an xml file sim to :-
<A>
<B>
</B>
</A>
I want to add <C> as follows :-
<A>
<B>
<C>Some text</C>
</B>
</A>
Looking at the docs for xmlpoke (note I'm using 0.84 and am not able to
upgrade to nightly builds)
<Quote>
The location specified by the XPath expression must exist, it will not
create the parent elements for you. However, provided you have a root
element you could use a series of the tasks to build the XML file up if
necessary.
</Quote>
I have tried to do this as follows :-
<xmlpoke
file="file.xml"
xpath="/A/B"
value="<C>Some text</C>" />
Does not work ('<', hexadecimal value 0x3C, is an invalid attribute
character.)
I have also tried to use :-
<xmlpoke
file="file.xml"
xpath="/A/B/C"
value="Some text" />
Which also fails as per the docs. Can anyone point me in the right
direction.
Thanks
Naz
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users