From: Ming C. <cim...@ya...> - 2012-01-12 05:15:05
|
Yeah! That's it. Thank you! Ming ________________________________ From: Noam Postavsky <npo...@us...> To: chen ming <cim...@ya...> Cc: "xml...@li..." <xml...@li...> Sent: Thursday, January 12, 2012 11:48 AM Subject: Re: Should the first node be text node for xpath: /descendant::node()/rec/child::node()[1] "chen ming" <cim...@ya...> writes: > I used "xml ed -d /descendant::node()/rec/child::node()[1] test.xml Okay, I see what's happening. The behaviour depends on whether libxml's keepBlanks option is set. xml ed has it off by default, but xml sel and xmllint have it on. You can get the other behaviour by passing the appropriate options: xml ed --pf (or -P) ... xml sel --noblanks (or -B) ... xmllint --noblanks ... Noam |