Abap – 遍历xml文档的整个节点?
发布时间:2020-12-16 23:13:14 所属栏目:百科 来源:网络整理
导读:我想遍历if_ixml_document的整个节点.这是最好的方法吗? 请查找示例文档. text id guid auto="false" 432543254543 /guid /id title short_title italics="on" bold language = "german" "Hello" /bold /short_title /title /text 在本文档中,我需要遍历节
我想遍历if_ixml_document的整个节点.这是最好的方法吗?
请查找示例文档. <text> <id> <guid auto="false"> 432543254543 </guid> </id> <title> <short_title italics="on"> <bold language = "german"> "Hello" </bold> </short_title> </title> </text> 在本文档中,我需要遍历节点< text>,< id>,< guid>,< title>,< short_title>,< bold>等等 提前致谢 问候, 解决方法
您可以找到
extensive XML manual on SAP’s documentation website(如果链接无法正常工作,请转到
help.sap.com上的NetWeaver开发人员指南并搜索“xml库”).
“iXML ABAP Objects Jumpstart”一章可以让您快速入门. “迭代完整的DOM树”段落提供了以下示例代码: data: iterator type ref to if_ixml_node_iterator,node type ref to if_ixml_node. iterator = document->create_iterator( ). node = iterator->get_next( ). while not node is initial. * do something with the node ... node = iterator->get_next( ). endwhile. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |