顯示具有 XML 標籤的文章。 顯示所有文章
顯示具有 XML 標籤的文章。 顯示所有文章

2010/08/06

[C#] XmlDocument 搭配 Linq 與 XPath

一般最常搭配 XML 用來查詢資料的技術是 XPath . 不過 .Net 僅支援到 XPath 1.0 , 有時想在 XPath 中加上日期函式的判斷都不行.
再加上若使用了 XPath 的函式或一些判斷式後, 整個 XmlDocument 的查詢效能會變慢. (參考以下的例子)
本文章所使用的 XML 內容 (ad.xml : 紀錄一些廣告圖與連結):

2010/08/02

[C#] 用 iTextSharp 讀寫 pdf 檔中的 XMP (metadata) 資訊

由於工作上需要將 pdf 檔案依政府的要求, 將分類檢索的資訊加註於 XMP 中, 所以才會開始研究這部分.
不太懂分類檢索的人可以參考 此網頁 中的資訊.
開發工具與環境:

2010/07/28

[C#] 利用 Regex 查詢 Html/Xml 標籤中的屬性值

作用: 取得 HTML 或 XML 內容中, 某個標籤下所指定的屬性值.
輸入參數:
  • strHtml(string): HTML 或 XML 的內容.
  • strTagName(string): 標籤名.
  • strAttributeName(string): 屬性名.

[ASP.NET] XML 與 XSL 的操作

users.xml 的內容如下:
<?xmlversion="1.0"encoding="utf-8" ?>
<root>
  <user>
    <account>John</account>
    <name>王小明</name>
  </user>
  <user>
    <account>Mary</account>
    <name>吳阿美</name>
  </user>
  <user>
    <account>David</account>
    <name>徐丁丁</name>
  </user>
</root>