日期:2014-05-18 浏览次数:20833 次
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory name="NHibernate.Test"> <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver, NHibernate</property> <property name="connection.connection_string"> Data Source=D:\Subject.db3;Version=3 </property> <property name="dialect">NHibernate.Dialect.SQLiteDialect</property> <property name="query.substitutions">true=1;false=0</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> </session-factory> </hibernate-configuration>
string FileName = "hibernate.cfg.xml"; XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(FileName); XmlNodeList nodeList = xmldoc.SelectSingleNode("hibernate-configuration").ChildNodes;