Bevan was kind enough to answer Shelly Midha's question on using XMLPeek. I am not an XPATH person, but am trying to update a XML file for input to an obfuscator. I'd like to be able to update each of the <Name> fields with a build dependant path. Here is the XML file
<?xml version="1.0" encoding="utf-8"?> <NineRays.ILOMD.Options.Project> <AssemblyList> <NineRays.ILOMD.Options.AssemblyFileName> <ObfuscationOptions> <NineRays.ILOMD.Options.Options> <Members>Full</Members> <SoftwareWatermark> </SoftwareWatermark> </NineRays.ILOMD.Options.Options> </ObfuscationOptions> <Name>A</Name> </NineRays.ILOMD.Options.AssemblyFileName> <NineRays.ILOMD.Options.AssemblyFileName> <ObfuscationOptions> <NineRays.ILOMD.Options.Options> <SoftwareWatermark> </SoftwareWatermark> </NineRays.ILOMD.Options.Options> </ObfuscationOptions> <Name>B</Name> </NineRays.ILOMD.Options.AssemblyFileName> </AssemblyList> </NineRays.ILOMD.Options.Project> First I want to verify that there is a <Name> with the value "A" <xmlpeek file=... xpath="/NineRays.ILOMD.Options.Project/AssemblyList/ NineRays.ILOMD.Options.AssemblyFileName[Name='A']" property="obs.project"/> If the property obs.project has length > 0, I know this record is there. Next I want to update the <Name> field with this <xmlpoke file=... xpath=""/NineRays.ILOMD.Options.Project/AssemblyList/ NineRays.ILOMD.Options.AssemblyFileName[Name='A']/Name" value="C:\temp\A.dll"/> I know that my xpaths are wrong (Everything I know about XML I learned while implementing NANT). What should I use to make this work? Stephen Lewis Envisioneering LLC - Medical Products St. Louis, MO 63114 (314) 429-7367 x112 ------------------------------------------------------- SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate online with coworkers and clients while avoiding the high cost of travel and communications. There is no equipment to buy and you can meet as often as you want. Try it free.http://ads.osdn.com/?ad_idt02&alloc_id135&op=click _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users