Hi,
I have a prolem using namespaces with XmlPoke. In the XML below, the row
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data"
causes an "No matching nodes were found with XPath expression
'/dataConfiguration/etc." If I remove that row, it works fine, but that is
not a solution. I tried to add the namespace node in the build file, but I
get confused on how to use the prefix attribute, since there is no prefix
for the row above.
<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
<xmlSerializerSection
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null">
<enterpriseLibrary.databaseSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
defaultInstance="Database Instance"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
<databaseType name="Sql Server"
type="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null" />
</databaseTypes>
<instances>
<instance name="Database Instance" type="Sql Server"
connectionString="Sql Connection String" />
</instances>
<connectionStrings>
<connectionString name="Sql Connection String">
<parameters>
<parameter name="database" value="IncidentSystemet"
isSensitive="false" />
<parameter name="Integrated Security" value="True"
isSensitive="false" />
<parameter name="Server" value="TestServer01"
isSensitive="false" />
</parameters>
</connectionString>
</connectionStrings>
</enterpriseLibrary.databaseSettings>
</xmlSerializerSection>
</dataConfiguration>
<xmlpoke verbose="true"
file="${delivery.dir.Web}\dataconfiguration.config"
xpath="/dataConfiguration/xmlSerializerSection/enterpriseLibrary.databaseSettings/connectionStrings/connectionString/parameters/[EMAIL PROTECTED]
= 'Server']/@value"
value="${web.config.DBServer}">
<namespaces>
<namespace prefix=""
uri="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data"
/>
</namespaces>
</xmlpoke>
_________________________________________________________________
Auktioner: Tjäna en hacka på gamla prylar http://tradera.msn.se
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users