Sample Header Ad - 728x90

Extract value of element in XML with xmlstarlet

6 votes
1 answer
4508 views
My situation is very specific, and I am a beginner with xmlstarlet. I have an XML file like the one below, which contains hundreds of entries.
2008-06-04 16:40
    Daniel
    New name of - Just an example.pdf
    Just an example.pdf
Where **root** = netbooks tag. **QUESTIONS** 1. I have the file hash 5a43dc3524, i want to take the **value** of **date**, that is 2008-06-04 16:40. What's the easiest way to do this? 2. Also, how to get the **attribute** id (that is 2) from **file** element? Again, I have the hash, just it.
Asked by Daniel (432 rep)
Jul 4, 2023, 01:22 PM
Last activity: Aug 6, 2024, 01:13 PM