是否可以使用XQUERY從以下XML檢索filename
屬性?我試圖用/preFileDoc/inpXML/@filename
但它不工作...使用XQUERY檢索屬性值
<?xml version="1.0"?>
<preFileDoc xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<senderId>ABC</senderId>
<receiverId>XYZ</receiverId>
<tranxCode>A001</tranxCode>
<inpXML version="1.0" encoding="UTF-8">
<soap-env:Envelope>
<soap-env:Header msgcode="SPPCONVAKT" orig-system="002FTB" refid="65355ff50a172064484bf9da64c1e245" timestamp="2009-02-11 21:00:10.741" filename="SPPCONVAKT20090128001.dat"/>
<soap-env:Body>
text1
text2
</soap-env:Body>
</soap-env:Envelope>
</inpXML>
</preFileDoc>
PS:有時候filename
屬性被作爲fileName
在傳入XML..thinking來檢索屬性@filename
或@fileName
值。 。它可以在單個XQUERY中實現嗎?感謝您的建議...
喜marc_s:
最後,
filename
不同市值可以圍繞通過指定兩個工作..它是在一些開發平臺,支持查詢某些xml節點值的xquery .. – user1140422 2012-01-10 08:51:41