Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XPath for get value in this xml

From: "Joe Fawcett" <joefawcett@---------.------>
To: NULL
Date: 9/6/2008 10:51:00 AM



"Rodrigo Juarez" <RodrigoJuarez@d...> wrote in message 
news:C89556A5-E2A3-473E-A1E5-6302B2FF50AD@m......
> Hi
>
> I have the following xml, and I need the XPath expression to obtain de 
> value
> of "value" in
> /configuration/activerecord/config type="GDR.Domain.GDRBO`1, 
> GDR.Domain"/add
> key="connection.connection_string"
>
> <?xml version="1.0"?>
> <configuration>
> <activerecord isWeb="true">
> <config type="GDR.Domain.GDRBO`1, GDR.Domain">
> <add key="connection.driver_class"
> value="NHibernate.Driver.SqlClientDriver"/>
> <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
> <add key="connection.provider"
> value="NHibernate.Connection.DriverConnectionProvider"/>
> <add key="connection.connection_string" value="Data
> Source=pcsql\sql2k;User Id=sa;Password=gg;initial catalog=GDR"/>
> </config>
> <config type="GDR.Domain.rrhh.rrhhBO`1, GDR.Domain.rrhh">
> <add key="connection.driver_class"
> value="NHibernate.Driver.SqlClientDriver"/>
> <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
> <add key="connection.provider"
> value="NHibernate.Connection.DriverConnectionProvider"/>
> <add key="connection.connection_string" value="Data
> Source=pcsql\sql2k;Initial Catalog=rrhh;User Id=sa;Password=gg"/>
> </config>
> <config type="GDR.Domain.Personal.PersonalBO`1, GDR.Domain.Personal">
> <add key="connection.driver_class"
> value="NHibernate.Driver.SqlClientDriver"/>
> <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
> <add key="connection.provider"
> value="NHibernate.Connection.DriverConnectionProvider"/>
> <add key="connection.connection_string" value="Data
> Source=pcsql\sql2k;Initial Catalog=db_IdPersonal;User Id=sa;Password=gg"/>
> </config>
> </activerecord>
> </configuration>
>
> Thanks In Advance
Predicates, or 'where' clauses, use brackets, attributes need to be prefixed 
by @, so:
/configuration/activerecord/config[@type="GDR.Domain.GDRBO`1, 
GDR.Domain"]/add[@key="connection.connection_string"]/@value

-- 

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent