xmlpeek and multiple nodes
Chris Fouts <[email protected]> Fri, 20 Apr 2012 09:02:25 -0400
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <[email protected]> |
--===============8656876690401616362==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967FD0771srv584caemilu_"
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967FD0771srv584caemilu_
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
How can I use xmlpeek/xmlpoke to recursively peruse all the similarly named=
nodes in a file, the the <test> node below.
<tests>
<test>...</test>
<test>...</test>
<test>...</test>
</tests>
This didn't help, http://nant.sourceforge.net/release/0.85/help/tasks/xmlpe=
ek.html
And I found this
http://old.nabble.com/xmlpeek---Multiple-nodes-found-with-the-XPath-express=
ion-td20017190.html
Per that page, do I really have to do this, that is hard code the indices? =
So if I add a 16th node, I'll have to change the script to add a 16th index?
<foreach item=3D"String" in=3D"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15" delim=
=3D"," property=3D"index">
<xmlpeek file=3D"${somefile} nodeindex=3D"${index}" ..../>
</foreach>
So I found this http://www.mail-archive.com/[email protected]=
t/msg11179.html
But my nant version 0.91 complains about <xmllist> being an unknown task or=
data type.
-chris
***This e-mail message is intended only for the above named recipient(s)
and may contain information that is sensitive or proprietary. If you have
received this message in error or are not the named recipient(s), please =
immediately notify the sender, delete this e-mail message without making
a copy and do not disclose or relay this e-mail message to anyone.***
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967FD0771srv584caemilu_
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>How can I use xm=
lpeek/xmlpoke to recursively peruse all the similarly named nodes in a file=
, the the <test> node below.<o:p></o:p></p><p class=3DMsoNormal><o:p>=
</o:p></p><p class=3DMsoNormal><tests><o:p></o:p></p><p class=
=3DMsoNormal> <test>…</test><o:p></o:p></p><p=
class=3DMsoNormal> <test>…</test><o:p></o:p>=
</p><p class=3DMsoNormal> <test>…</test><o:p>=
</o:p></p><p class=3DMsoNormal></tests><o:p></o:p></p><p class=3DMsoN=
ormal><o:p> </o:p></p><p class=3DMsoNormal>This didn’t help, <a =
href=3D"http://nant.sourceforge.net/release/0.85/help/tasks/xmlpeek.html">h=
ttp://nant.sourceforge.net/release/0.85/help/tasks/xmlpeek.html</a><o:p></o=
:p></p><p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>And I=
found this<o:p></o:p></p><p class=3DMsoNormal><a href=3D"http://old.nabble=
.com/xmlpeek---Multiple-nodes-found-with-the-XPath-expression-td20017190.ht=
ml">http://old.nabble.com/xmlpeek---Multiple-nodes-found-with-the-XPath-exp=
ression-td20017190.html</a><o:p></o:p></p><p class=3DMsoNormal><o:p> <=
/o:p></p><p class=3DMsoNormal>Per that page, do I really have to do this, t=
hat is hard code the indices? So if I add a 16<sup>th</sup> node, I’l=
l have to change the script to add a 16<sup>th</sup> index?<o:p></o:p></p><=
p class=3DMsoNormal><span style=3D'font-size:10.0pt;font-family:"Arial","sa=
ns-serif";color:navy'><foreach item=3D”String” in=3D”1=
,2,3,4,5,6,7,8,9,10,11,12,13,14,15” delim=3D”,” property=
=3D”index”><o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:navy'>&nbs=
p; <xmlpeek file=3D”${somefile} nodeindex=3D”${index}&=
#8221; …./><o:p></o:p></span></p><p class=3DMsoNormal><span style=
=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:navy'></fore=
ach</span><span style=3D'font-family:"Arial","sans-serif";color:navy'>><=
o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'font-family:"Arial=
","sans-serif";color:navy'><o:p> </o:p></span></p><p class=3DMsoNormal=
><span style=3D'font-family:"Arial","sans-serif";color:navy'>So I found thi=
s <a href=3D"http://www.mail-archive.com/[email protected]/m=
sg11179.html">http://www.mail-archive.com/[email protected]/=
msg11179.html</a><o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'=
font-family:"Arial","sans-serif";color:navy'>But my nant version 0.91 compl=
ains about <xmllist> being an unknown task or data type.<o:p></o:p></=
span></p><p class=3DMsoNormal><span style=3D'font-family:"Arial","sans-seri=
f";color:navy'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=
=3D'font-family:"Arial","sans-serif";color:navy'>-chris</span><o:p></o:p></=
p></div><p></p>
<p><br>
***This e-mail message is intended only for the above named recipient(s)<br>
and may contain information that is sensitive or proprietary. If you have<b=
r>
received this message in error or are not the named recipient(s), please <b=
r>
immediately notify the sender, delete this e-mail message without making<br>
a copy and do not disclose or relay this e-mail message to anyone.***</p></=
body></html>
--_000_CAEEAE7CCE73AD44B00FC28BC7982FAC0967FD0771srv584caemilu_--
--===============8656876690401616362==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
--===============8656876690401616362==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
--===============8656876690401616362==--