Menu

#89 spurious end-of-line characters

closed-duplicate
nobody
main code (54)
5
2011-12-31
2011-12-30
No

On the following XML file:

<?xml version="1.0" encoding="utf-8"?>
<root>
<item v="1">a</item>
<item v="2">b</item>
<item v="3">c</item>
<item v="4">d</item>
<item v="5">e</item>
</root>

I get with XMLStartlet 1.3.0:

% xmlstarlet sel -T -t -m '/root' -v 'item/@v' list.xml
12
3
4
5
% xmlstarlet sel -T -t -m '/root' -v 'item' list.xml
ab
c
d
e
%

That's not consistent. I think I should get "12345" and "abcde" respectively. XMLStartlet 1.0.2 was giving the value of the first node only.

Discussion

  • Noam Postavsky

    Noam Postavsky - 2011-12-31

    This is a duplicate of Tracker #2563866 (https://sourceforge.net/tracker/index.php?func=detail&aid=2563866&group_id=66612&atid=515106). Further discussion of whether the newlines are spurious should go there.

    The 1.3.0 behaviour is a broken implementation, however the intention was to have values be newline separated.

     
  • Noam Postavsky

    Noam Postavsky - 2011-12-31
    • status: open --> closed-duplicate
     

Log in to post a comment.

Auth0 Logo