|
[Nant-users] XmlPoke Namepace problem
From: Fredrik T <fredrik255@ho...> - 2005-06-30 13:30
|
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/parameter[@name = '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 |
| Thread | Author | Date |
|---|---|---|
| [Nant-users] XmlPoke Namepace problem | Fredrik T <fredrik255@ho...> |