Sample Header Ad - 728x90

How to extract specific node values without travesing via xmlstarlet

2 votes
1 answer
1284 views
asdadw@cutshort.io
    sadfasd@cutshort.io
    asdas@cutshort.io
    
        56.456.155.423, 54.455.155.654, 544.47.745.80, 54.192.155.842
        abc.cutshort.io
    
    cdn.cutshort.io
    
        56.456.155.423, 54.455.155.654, 544.47.745.80, 54.192.155.842
        abc.cutshort.io
    
    www.cutshort.io
    blogdata.cutshort.io
    cdn.cutshort.io
I want to extract the value of "host" without extracting the value of "hostname" or "ip". The output is supposed to look like this:
cdn.cutshort.io
www.cutshort.io
blogdata.cutshort.io
cdn.cutshort.io
I have only recently started xml parsing so please be patient. Any help will be appreciated!
Asked by Abhinav Gupta (33 rep)
Nov 18, 2020, 01:52 AM
Last activity: Nov 18, 2020, 02:39 AM