|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Nasty XPath expressions
I'm not sure how closely this mirrors the behavior of .valueOf, but I often use: node.SelectSingleNode(strXPath).InnerXml This works with the native MSXML and managed .NET classes, and gives you whatever the value of the selected element or attribute is. You have to cast it to the appropriate type if you want something other than a string; you could probably get the type from the SOM if there is an XSD associated, but I never bothered. > -----Original Message----- > From: Francis Norton [mailto:francis@r...] > Sent: Friday, December 14, 2001 10:13 AM > To: Christian Nentwich > Cc: xml-dev > Subject: Re: Nasty XPath expressions > > > > Christian Nentwich wrote: > > > On Fri, 2001-12-14 at 14:42, Steve Muench wrote: > > > >>Oracle's XML Parser also provides an XPath engine that's > >>woven into our DOM implementation. Using it is as easy as: > >> yourNode.selectNodes("Your/Favorite[XPath=Here]"); > >> yourNode.selectSingleNode("Your/Favorite[XPath=Here]"); > >> yourNode.valueOf("Your/Favorite[XPath=Here]"); > >> > >> > > > > You say your users haven't asked for more, but if I was to become your > > user, I would. .net offers these methods as well, > > > How does .Net support .valueOf(<XPathExpression>)? I'm interested > because the fact that MSXML 3 only supports XPath expressions that > return node-lists is a bit of a frustration, and I couldn't find any > improvement on this in .Net beta 2. > > Francis. > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








