0
A
回答
0
XMLPlatformUtils::Initialize();
XPathEvaluator::initialize();
{
const XalanDOMString theFileName(fileName);
const LocalFileInputSource theInputSource(theFileName.c_str());
XalanSourceTreeInit theSourceTreeInit;
XalanSourceTreeDOMSupport theDOMSupport;
XalanSourceTreeParserLiaison theLiaison(theDOMSupport);
theDOMSupport.setParserLiaison(&theLiaison);
XalanDocument* const theDocument =
theLiaison.parseXMLStream(theInputSource);
if(!theDocument) {
std::cerr << "Failed to create XalanDocument" << std::endl;
retValue = -1;
}
XalanDocumentPrefixResolver thePrefixResolver(theDocument);
XPathEvaluator theEvaluator;
XalanNode* const rootContextNode = theEvaluator.selectSingleNode(
theDOMSupport, theDocument,
XalanDOMString("/processing-instruction('xml-stylesheet')").c_str(),
thePrefixResolver);
if(rootContextNode) {
//<Now do whatever u want :)>
}
相關問題
- 1. 獲取處理指令值
- 2. Marklogic - 如何處理XML中的處理指令
- 3. 從信號處理程序獲取保存的指令指針地址
- 4. 序列化XML處理指令
- 5. 如何獲取XSL中的處理指令屬性值
- 6. 如何在轉換XML時從處理指令中提取信息?
- 7. 如何從CanExecute處理程序中獲取MenuItem?
- 8. Java Selenium:如何從UnhandledAlertException處理程序中獲取NoAlertPresentException?
- 9. 如何從請求處理程序中獲取數據
- 10. 從android中的處理程序獲取應用程序實例
- 11. 在SIGILL處理程序中,如何跳過違規指令?
- 12. 從onclick處理程序獲取URL
- 13. 如何在SDL Tridion中保留xml文件的處理指令?
- 14. 從命令處理程序獲取起始視圖
- 15. X86程序集 - 處理IDIV指令
- 16. 如何根據處理程序本身的URL獲取處理程序類?
- 17. 我可以使用XPath獲取XML中處理指令的內容嗎?
- 18. 如何從處理程序中獲取事件處理程序所附的元素?
- 19. 是否可以基於源文檔中的XML處理指令來包含/排除XML處理指令?
- 20. 如何從自定義請求處理程序獲取IndexReader?
- 21. Python:如何從BaseHTTPRequestHandler HTTP POST處理程序獲取鍵/值對?
- 22. 如何從動作列處理程序獲取行
- 23. 如何從fineuploader處理程序獲取屬性?
- 24. 如何從處理程序獲取數據
- 25. 如何從C處理程序獲取TCL腳本名稱
- 26. 使JAXB生成XML處理指令
- 27. 解析XML樣式表處理指令
- 28. XML處理指令和空白
- 29. 在命令處理程序中獲取Roslyn語法節點
- 30. 使用XSLT從XML文件中刪除所有處理指令
的可能重複的[這是XPath表達式來選擇處理指令?](http://stackoverflow.com/questions/9426910/what-is-the-xpath-expression-到選-A-處理指令) – Flynn1179 2012-02-27 07:50:18