Questions tagged [xmllint]
A validator for XML files.
35 questions
1 vote
2 answers
330 views
how can I select element using xmllint command?
I am trying to select "Bvlgari omnia crystalline'perfume' 100ml" by making use of xmllint from the codes below. But As I'm newbie in the field of linux,It is insanely difficult to figure out ...
4 votes
4 answers
3k views
Create CSV from an xml file
I'm trying to create a csv from an xml with just some information from the xml. This is my xml : <?xml version="1.0" encoding="UTF-8"?> <hashlist version = "2.0" ...
2 votes
3 answers
1k views
How can XPath functions be expressed to output each input element?
I'm using this command: xmllint --xpath 'substring-after(string(//item/link), "_")' rss.xml And get the desired output, except it's on the first element. How would I fix this to have it be ...
0 votes
1 answer
529 views
xmlstarlet how to select tag immediately before selected tag
I scan scribus SLA files and wish to find the text having some specific paragraph styles. SLA file format is a quite flat XML format and there are several paragraphs in a row, each being separated ...
1 vote
2 answers
937 views
I want to add a namespace prefix to the tags of the default name space of an XML document from the shell
I have a SVG file, which is an XML document: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" ...
0 votes
1 answer
2k views
xmllint usage - having a hard time getting xml attributes
I'm in the process of retreiving some data from a xml file, it is actually a SSIS package file (dtsx). I've read about using xmllint, however I'm having a hard time retrieving what I want. I'd like ...
3 votes
1 answer
5k views
how to output html to a file with xmllint?
How do I get xmllint to output to a file? thufir@dur:~/xmllint$ thufir@dur:~/xmllint$ xmllint --html http://www.skynet.be/nieuws-sport/weer/mijn-weer?cityId=6450 --xpath '//div[@class = "tides"]' - ...
1 vote
1 answer
12k views
How to grep an XML tag and get only the value inside the quotes after it?
I'm trying to get these values from the XML format below: USA GERMANY <country name="USA" id="TEST1" password="123" /> <country name="GERMANY" id="TEST2" password="456" /> I was ...