2009-07-27 112 views
0

我用什麼XPath查詢xml中的信息節點?我在XMLSpy中嘗試了不同的表達式,但沒有任何效果。空名稱空間的XPath查詢xmlns =「」

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

回答

0

,你可以做這樣的

<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> 
+0

我不能讓那個代號啄在IE8工作。所以我不得不逃脫evertthing – Tommy 2009-07-27 08:44:26