Questions tagged [xmlstarlet]
7 questions
5
votes
1 answer
XML query by the xmlstarlet
The Maven settings file looks like:
2
votes
1 answer
Efficiently extracting a few data from a large XML file
I need to extract a few field contents from a large XML file. I currently do this though a combination of xmlstarlet and a Python script (using ElementTree). The idea was to trim the XML file from useless data with xmlstarlet and then process the…
WoJ
- 3,875
2
votes
1 answer
2
votes
0 answers
print XPath for match using xmlstarlet?
I would like to iterate over many xml files to fix outdated configuration entries by getting all matches and replacing then in a second step every entry by updated strings (multiline scripts in this case).
I'm aware how to query/select and print…
Heiko Robert
- 121
1
vote
2 answers
XML query in Bash with XMLStarlet
I need to extract a few values from an XML file, and I stumbled onto XMLStarlet that seems pretty powerful. Knowing little about XML, I'm overwhelmed with the tool, and likely need only a very tiny part of it. I have a file like the following and I…
gmark
- 41
0
votes
3 answers
Why does XMLStarlet return additional whitespace/newline for XML text nodes?
I'm trying to manipulate XML data with XMLStarlet for translation purposes as asked in https://superuser.com/questions/598910/translate-text-nodes-of-graphml-xml-cas but although the nodes I am trying to read are returned, there is…
handle
- 305
0
votes
1 answer
how to set default values for attributes in xml
How do i set default values for attributes in xml. Consider below test.xml.
An attribute 'gender' with default value 'male' has been defined for element 'to'.
I am however unable to retrieve it using xmlstarlet. Am i doing something wrong? Please…
Kaushik
- 1