1
我需要根據DTD架構驗證xml文件。我發現我需要通過模式文件的來源進行驗證。是否有可能使libxml2在XML文件中查找模式聲明並自行進行驗證,還是必須手動檢索聲明?libxml2 - 根據模式驗證XML文檔。從實際的XML文件中檢索架構url
在此先感謝 米哈爾
我需要根據DTD架構驗證xml文件。我發現我需要通過模式文件的來源進行驗證。是否有可能使libxml2在XML文件中查找模式聲明並自行進行驗證,還是必須手動檢索聲明?libxml2 - 根據模式驗證XML文檔。從實際的XML文件中檢索架構url
在此先感謝 米哈爾
從理論上講,你可以使用把XML文件中的xsi:schemaLocation
屬性,讓XML處理器找出了XML Schema是。
libXML中xsi:schemaLocation
的狀態不清楚,請參閱此錯誤報告:https://bugzilla.gnome.org/show_bug.cgi?id=157205。它似乎在庫本身中實現,但未在所提供的xmllint
util中啓用。