Menu

#41 val options -u and -a don't work at the same time

open
nobody
None
5
2011-06-01
2011-05-30
No

Listing elements and filtering the output by unique lines (via -u) works like a charm. Once one tries to display attributes, while again filtering output by unique lines, xmlstarlet complains. Could this mode of operation be added to xmlstarlet? Test file config.xml attached.

skayser @ ray1 ~/tmp$ xmlstarlet el -u config.xml
UserScriptConfig
UserScriptConfig/Script
UserScriptConfig/Script/Exclude
UserScriptConfig/Script/Include

$ xmlstarlet el -a -u config.xml
I/O warning : failed to load external entity "-u"

Discussion

  • Sebastian Kayser

    Initial bug report was for 1.0.2. Tested again with 1.1.0. Output is different, but not for the better ;)

    $ xmlstarlet el -a -u config.xml
    $

    No output.

     
  • Noam Postavsky

    Noam Postavsky - 2011-06-01
    • labels: 475157 -->
    • summary: Command line options -u and -a don't work at the same time --> val options -u and -a don't work at the same time
     
  • Noam Postavsky

    Noam Postavsky - 2011-06-01

    I added an error message for nonexistant file in commit e6ae150fa2ca3f86b0ae5f61589a069035f2fd0e,

    As for actually implementing this, it certainly could be done, but since you can just pipe into sort -u, I don't see it as very high priority. Moving to feature requests.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.