Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
112 views

I have content in the XML node <content type='html'> which uses the HTML entities &lt; and &gt; for < and > , i.e. in input.xml: <?xml version='1.0' encoding='utf-8'?> <...
BlueDogRanch's user avatar
1 vote
1 answer
68 views

I'm trying to remove all the comments from an XML export of a Blogger blog. This involves finding and deleting each <entry> that contains a child node of <blogger:type>COMMENT</blogger:...
BlueDogRanch's user avatar
0 votes
1 answer
102 views

The answer to my earier question How do I access an XML node that uses quote marks with xmlstarlet? shows how to access a node using the namespace, and in that case, deleting the entire node. ...
BlueDogRanch's user avatar
1 vote
1 answer
53 views

I'm trying to learn how to use xmlstarlet 1.6.1 https://xmlstar.sourceforge.net and I can't find how to escape the quotes or otherwise get xmlstarlet to recognize <content type="html"> ...
BlueDogRanch's user avatar
1 vote
1 answer
37 views

System: Debian 12 xmlstarlet --version 1.6.1 compiled against libxml2 2.9.14, linked with 20914 compiled against libxslt 1.1.35, linked with 10135 below a reduced debugging (example.xml) version of ...
thomas's user avatar
  • 256
0 votes
2 answers
60 views

System Info alinuxchap@libertus-desktop:~ $ uname -a Linux libertus-desktop 6.12.25+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux alinuxchap@libertus-desktop:~ $ ...
Signor Pizza's user avatar
0 votes
0 answers
73 views

I am trying to sort data using xmlstarlet. Here is a sample of the XML I am querying. <container> <item> <enabled>true</enabled> <param name="label">...
johnwangel's user avatar
2 votes
4 answers
115 views

I have an XML file that looks like this: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE rrd SYSTEM "https://oss.oetiker.ch/rrdtool/rrdtool.dtd"> <!-- ...
flyingfishfinger's user avatar
0 votes
4 answers
170 views

XML: https://raw.githubusercontent.com/dp247/Freeview-EPG/master/epg.xml Example <tv> <programme channel="VirginRadio.uk" start="20250319220000 +0000" stop="...
Richard Barraclough's user avatar
1 vote
2 answers
63 views

I am parsing a file: <?xml version="1.0" encoding="ISO-8859-1"?> <detection-run> <wireless-network> <SSID> <...
Random Data Monster's user avatar
0 votes
6 answers
167 views

I have a valid XML file. I would like to duplicate a tag with contents via linux shell command(s). By duplication I mean: copy <x>...</x> entirely, then paste right after the original. I ...
Jack White's user avatar
0 votes
2 answers
89 views

So, I have this as input file, temp.html: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body> &...
sdbbs's user avatar
  • 5,948
1 vote
1 answer
85 views

I'm not getting the external DTD, a local file in the same folder, to work with a relative or an absolute path. It is not expanding the variable and gives an error in both Firefox and xmlstarlet. ...
Nils Deschrijver's user avatar
1 vote
2 answers
116 views

I want to use xmlstarlet to select some records of a gigantic .xml file. My problem is, that I need the output to be valid XML. Minimal example: using xmlstarlet sel -t -c "//record[@type='TypeA']...
DrSvanHay's user avatar
  • 1,192
0 votes
1 answer
50 views

I want to write a script to iterate over each element "NewTempP" with attributes and child element and copy the structure to element "fig" as child element. "NewTempP" ...
Ofuuzo's user avatar
  • 57
0 votes
1 answer
62 views

I have the following xml file: <?xml version="1.0" encoding="UTF-8"?> <sec> <NewTempP>xxx</NewTempP> <fig> <label></label> <...
Ofuuzo's user avatar
  • 57
0 votes
1 answer
199 views

I have this xml file ( truncated) <adddata dn="articulo"> <attr name="code"> <value>34839473</value> <value>12263522</value> </attr> </...
Carlos Otero's user avatar
0 votes
1 answer
59 views

When I query an XML document with an XPATH, I only get the matched node(s) as a result. Is there a way to get the matched node(s) together with their parents up until root? Lets take this very minimal ...
Kurtibert's user avatar
  • 700
0 votes
1 answer
232 views

I am trying to have an automated way to amend or apply additional policy on APIs or operations scope of Azure APIM and in my script i am able to read a variable $inbound or $outbound or $backend or $...
Vowneee's user avatar
  • 1,551
1 vote
2 answers
60 views

I want to get the text element based on the values given in "part1". In below example XML, I want Text2 and Text5 to be returned, because the values in part1 refer to 2 and 5. How can this ...
Luuk's user avatar
  • 15.4k
0 votes
1 answer
127 views

The parse yaml utility which I used in my shell script produces variables as below by eval command policy1_name='ipfilter' policy1_scope='api' policy1_apiname='apiname' policy1_inboundsession='rate-...
Vowneee's user avatar
  • 1,551
1 vote
1 answer
62 views

We have a policy.xml file as below and need to insert a string like below under each session of the xml file under (inbound or backend or outbound) just under <base /> depending on the ...
Vowneee's user avatar
  • 1,551
-1 votes
1 answer
794 views

Xmlstarlet is perfectly fits my needs, but faced issue, that it has no executable file (something like .jar file and etc). I am trying to use it via a shell script, but server has no xmlstarlet ...
4rmr3d1's user avatar
  • 97
0 votes
2 answers
106 views

I have an xml document of the form root +- foo +- bar | +- @baz I want to extract the value of /root/foo and of /root/bar/@baz in one go from the command line. I can do cat file.xml | xmlstarlet ...
Vihung's user avatar
  • 13.5k
0 votes
1 answer
118 views

I have a simple xml file and I want to select 1) the first two occurrence words and 2) the rest in the element using xmlstarlet: <fig> <caption>Figure 1: Testing the figure</...
Ofuuzo's user avatar
  • 57
-1 votes
1 answer
249 views

I am trying to generate a newsletter which, among other stuff, includes news entries which are present on the website as well. The website is built with WordPress and has an RSS feed, which is not ...
Photon's user avatar
  • 355
3 votes
2 answers
139 views

I have some XML like this: some.xml: <one> <two> <three> <four>some text</four> </three> </two> <two> <three> <...
ospf's user avatar
  • 300
1 vote
1 answer
99 views

I have an xml file test.gpx: cat test.gpx <?xml version="1.0" encoding="UTF-8"?> <gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://...
swiss_knight's user avatar
  • 8,381
0 votes
2 answers
73 views

I am creating a bash script to replace various values in a large XML file using XMLStarlet. For one specific situation I fail to find the proper XMLStarlet commandline syntax. I created a simplified ...
PvSw-01's user avatar
0 votes
1 answer
107 views

Let's assume we have two directories: /home/a /home/b In directory a with have lots of XML files like this: <root> <id>87182378127381273</id> <name>just a name</name>...
basZero's user avatar
  • 4,294
0 votes
1 answer
127 views

I have an XML file that looks like this: <?xml version="1.0" encoding="UTF-8"?> <ChannelList> <channel> <tvg-logo>https://tvpmlogopus.samsungcloud.tv/...
sturmey's user avatar
0 votes
2 answers
107 views

Using bash I am trying to extract id and name as key value pair from below soap response and want to store this pair in csv file. Below xmllint command is returning unwanted values as I am not able to ...
Ranjeet's user avatar
  • 423
0 votes
1 answer
87 views

Staring with an xml file, mg.xml <?xml version="1.0"?> <domain type="kvm"> <name>Comus</name> <devices> <interface type="network"&...
Mark Grant's user avatar
0 votes
2 answers
163 views

I am trying to create an sqlite3 loader from data returned from ( Service-Now's REST API ) but it uses self closing tags in it's xml return. If I could convert the fields from empty self closing to an ...
Bruce Ferjulian's user avatar
0 votes
2 answers
922 views

I have several big archives in XML that I need to split the main node into files, and use the node's title attribute as name, eg: <book title="ABC123" year="2000"> <...
Dani's user avatar
  • 3
0 votes
1 answer
737 views

I'm trying to convert an .xml to .csv using xmlstarlet. My filename is test.xml. The .xml data is like this: <?xml version = '1.0' encoding = 'UTF-8'?> <ws_export xmlns="http://ws_export....
ultratrouble's user avatar
4 votes
1 answer
3k views

I get an error while trying to parse an xml using xmlstarlet. -:1.13408001: xmlSAX2Characters: huge text node: out of memory ...
Invalidsearch's user avatar
1 vote
2 answers
128 views

I have the following xml file that I would like to swap the positions of the two siblings ("firstname" and "surname"): From: <?xml version="1.0" encoding="utf-8&...
Ofuuzo's user avatar
  • 57
-1 votes
1 answer
382 views

I am trying to convert JSON file into XML using following command which used JQ and XMSTARTLET jq -r 'def walk(f): . as $in | if type == "object" then reduce keys_unsorted[] as $key (.; .[$...
Krishan Gopal's user avatar
-1 votes
1 answer
91 views

I am trying to edit android manifest file with xmlstarlet. I want to change package attribute node. Input file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:...
playerone's user avatar
  • 1,127
2 votes
1 answer
173 views

I need with xmlstarlet to filter the content of a XML and export elements based on subelement criteria Using this kind of xml: <products> <product> <product_code>1-70-032-0023</...
weby's user avatar
  • 57
1 vote
1 answer
150 views

I was trying to pull some data out of an XML file using xmlstarlet, but xmlstarlet sel -t -v '//div[contains(@class,'addresses')]/a' was getting me a lot more than I expected. I finally worked out - ...
android.weasel's user avatar
0 votes
1 answer
333 views

I am trying to determine how to use xmlstarlet to get the xml tag and values when the tag elements aren't constant. for example, Input file: <?xml version="1.0" encoding="us-ascii&...
Invalidsearch's user avatar
1 vote
1 answer
115 views

XML to edit - <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <broker xmlns="http://activemq.apache.org/schema"> <jaas-security domain=...
Subhidh Agarwal's user avatar
0 votes
0 answers
54 views

How do I swap the positions of two siblings: From: <article> <name> <firstname>John</firstname> <surname>Pettterson</surname> </name> </...
Ofuuzo's user avatar
  • 57
3 votes
3 answers
430 views

I have two xml files A and B. I want to insert certain element nodes in A to B. It went fine but the imported elements were not "unescape" in B: XML file A: <?xml version="1.0"?&...
Ofuuzo's user avatar
  • 57
-2 votes
1 answer
310 views

I want to copy from an xml file, two element nodes to another node (parent) in an existing xml file using xmlstarlet. input example: <?xml version="1.0" encoding="utf-8"?> &...
Ofuuzo's user avatar
  • 57
-1 votes
1 answer
164 views

Team, I have below xml file which is missing a node at line 9. so I need to insert it and not anywhere else. line to insert <file branch-rate="0.0" complexity="0" path="src/...
AhmFM's user avatar
  • 1,842
-2 votes
1 answer
88 views

I want to insert a subnode as the first subnode sibling using xmlstarlet. I have the following xml file: src.xml <xml> <subnode> Peter Paul </subnode> <subnode> Peter ...
Ofuuzo's user avatar
  • 57
-1 votes
2 answers
139 views

I have a large (750mb) XML file. I would like to replace the string file://localhost/E:/ with the following string file:///Volumes/TOSHIBA%20EXT/ it appears throughout the xml file in a line like ...
Jon Hicks's user avatar

1
2 3 4 5
13