From: chen m. <cim...@ya...> - 2012-01-11 07:24:20
|
I used "xml ed -d /descendant::node()/rec/child::node()[1] test.xml > result.xml Thanks, Ming 已通过MOTOBLUR™连接 -----原始信息----- From: Noam Postavsky <npo...@us...> To: Ming Chen <cim...@ya...> 抄送: "xml...@li..." <xml...@li...> 已发送: 2012 1月, 周二, 10 16:26:59 格林尼治标准时间+0000 主题: Re: Should the first node be text node for xpath: /descendant::node()/rec/child::node()[1] On Tue, Jan 10, 2012 at 12:05 AM, Ming Chen <cim...@ya...> wrote: > While my original expected outputs (which really is XmlStar and > XPathBuilder's output) are: "<para type="error" position="1"/><para > type="warning" position="1"/><para type="info" position="1"/>", the > XmlLint and XPathTester give some empty lines actually. I get blank lines from XMLStarlet as well, which is not surprising since it's based on the same code as xmllint. What command line arguments did you use for XMLStarlet? I used xml sel -t -c "/descendant::node()/rec/child::node()[1]" test.xml Noam |