Naz,

Support for namespaces has indeed been added post 0.84. You can always
create a <xml-insert> task (or something like that) and contribute it to
NAnt(Contrib).

Gert


----- Original Message ----- 
From: "Naz Quadri" <[EMAIL PROTECTED]>
To: "Naz Quadri" <[EMAIL PROTECTED]>
Cc: "Curtis Zarger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, October 26, 2004 9:27 PM
Subject: Re: [Nant-users] Trying to add a node using xmlpoke


> Looking at the release notes it seems that namespaces have been added to
> the nightly build for xmlpoke, so I assume that this is not possible in
> 0.84. Could anyone confirm or deny this ? Are there any workarounds ?
> Failing all else I shall simply write a <script> task to do it, it would
> just be nicer to use a ready built task.
>
> Thanks
>
> Naz
>
> Naz Quadri wrote:
>
> > I've just realised that the file I'll be using needs namespaces so the
> > below becomes :-
> >
> > <xx:A>
> >    <xx:B>
> >    </xx:B>
> > </xx:A>
> >
> > and I need :-
> >
> > <xx:A>
> >    <xx:B>
> >       <xx:C>Some text</xx:C>
> >    </xx:B>
> > </xx:A>
> >
> > Doesn't quite seem to work for me. Any suggestions ?
> >
> > Thanks
> >
> > Naz
> >
> > (Note again I am using 0.84 and am not able to use the nightly builds,
> > thanks)
> >
> >
> > Curtis Zarger wrote:
> >
> >> Naz,
> >>
> >> Have you tried to remove the '<' and '>' characters, replacing them
with
> >> &lt; and &gt;?
> >>
> >>            <xmlpoke
> >>                file="file.xml"
> >>                xpath="/A/B"
> >>                value="&lt;C&gt;Some text&lt;/C&gt;" />
> >>
> >> 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:
> > Sybase ASE Linux Express Edition - download now for FREE
> > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > _______________________________________________
> > Nant-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to