Hi,
I am trying to use an XmlDocument object to manipulate the default database
instance node of the enterprise template library dataConfiguration section
from a custom installer step:
<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
<xmlSerializerSection
type="Microsoft.Practices.EnterpriseLibrary.Data.C onfiguration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.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="AdessoOdbc"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
<databaseTypes>
I have tried several XPath queries but I am not having any luck fetching the
"defaultInstance" attribute - xpath seems to be unhappy about the '.' in the
"enterpriseLibrary.databaseSettings" node name. For example this code:
XmlNode node =
xml.SelectSingleNode("dataConfiguration/xmlSerializerSection/enterpriseLibrary.databaseSettings");
does NOT return "enterpriseLibrary.databaseSettings" node - it returns null.
Any ideas on how I can get to the defaultInstance attribute?