Sample Header Ad - 728x90

Create CSV from an xml file

4 votes
4 answers
3343 views
I'm trying to create a csv from an xml with just some information from the xml. This is my xml :
2022-11-06T01:22:14+00:00
        MacBook-Pro-de-Baptiste.local
        ARRI HDET job
    
    
        in-place
    
    
        
            A_0900C001_220927_102036_a1BZ0_hde.mxf
            3f93f215ec277fc7
        
        
            A_0900C002_220927_102120_a1BZ0_hde.mxf
            6a3c2be7577f31bd
        
        
            A_0900C003_220927_102240_a1BZ0_hde.mxf
            6606cf4d3b1ebc17
        
        
            A_0900C004_220927_102334_a1BZ0_hde.mxf
            cd0a2dca6f8f6c21
        
        
            A_0900C005_220927_102506_a1BZ0_hde.mxf
            e617e05dae72e5a6
        
        
            A_0900C006_220927_102615_a1BZ0_hde.mxf
            d6e487264d1246b0
        
        
            A_0900C007_220927_102720_a1BZ0_hde.mxf
            80f5f5683e1f326d
And I want something like that : A_0900C001_220927_102036_a1BZ0_hde.mxf;3f93f215ec277fc7 A_0900C002_220927_102120_a1BZ0_hde.mxf;6a3c2be7577f31bd etc... I've tried
xmllint --xpath '/hashlist/hashes/hash/path/text()' file.xml
but the return is "XPath set is empty"
Asked by MrBotus (41 rep)
Nov 8, 2022, 12:54 PM
Last activity: Feb 15, 2025, 05:21 PM