tags:

views:

522

answers:

1

What XPath do I use to query the info node in the xml below? I've tried different expressions in XMLSpy but nothing works.

<root xmlns="tempuri.org" xmlns:p="http://nonamespace.org/std/Name/2006-10-18/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<item xmlns="">
 <info>blah blah</info>
 <date>2009-07-27 00:00:00</date>
</item>

A: 

you can do it like this

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="tempuri.org">

<xsl:template match="/">
     <xsl:value-of select="a:root/item/info"/>
</xsl:template>
Tommy
I can't get that code-thingy to work in IE8. So I had to escape evertthing
Tommy
Have a look at the little "help" box at the right of the editor.
Tomalak
Okay, figured it out
Tommy
That works great, thanks!!! Simple when you know how :)
horls