(XML, XSLT, XPATH, 所有與XML相關的)Search from attributes use XPATH

To search a attribute via XPATH. you can use Element[@Attr] to address it in XPATH.So~~ to search some specific search as follow:1. product@cost which is > 5000, you can write as follow.product[@cost > '5000']2. product@name contains "yellow" (case-insensitivity).contains(translate(product[@name], 'ABC...Z', 'abc....z'),...
由 Evan 發表於 05:13 PM | 迴響 (0) |引用 AddToD.png AddToF.png

(XML, XSLT, XPATH, 所有與XML相關的)How to use KEY in xslt

I think XML is a very simple storage medium that you can save and query in it. But all data is storage as a tree node in the XML. In this case, it can very simple to save hierarchy...
由 Evan 發表於 12:05 PM | 迴響 (0) AddToD.png AddToF.png

(XML, XSLT, XPATH, 所有與XML相關的)String compare using XSLT and XPATH

I have summerized some note about the string comparison via XSLT and XPATH.Find specific string with "=":Find specific Item with text "testITEM".<xsl:apply-templates select="//*[Item[text() = 'testITEM']]"></xsl:apply-templates>Find specific string with "contains":Find specific Item which contain "testITEM".<xsl:apply-templates select="//*[contains(Item,'testITEM']"></xsl:apply-templates>Find specific string  case-insensitivity "=":Find specific Item with text...
由 Evan 發表於 07:15 PM | 迴響 (0) AddToD.png AddToF.png