Questions tagged [xmllint]

xmllint is a command line XML parser which provides syntax validation, gzip compression, and formatting options.

xmllint is a command line tool that is part of libxml2 which is a C Parser and toolkit that runs on multiple platforms. Download links for libxml2 can be found at http://xmlsoft.org/downloads.html

344 questions
-1
votes
1 answer

having a hardtime to use xmllint to search info in my xml file

I am hoping if anyone can help me on searching "password" info from my xml file using xmllint command. here is my xml file looks like:
Jerry Jie
  • 1
  • 2
-1
votes
1 answer

how to add break line in xmllint command

I have the following command xmllint --xpath "//*[local-name()='softwareSystem']/module/rootPath[not(@*[local-name()='type'])]/@name" file.xml and would like to sperate each module (every matching) on a new line thanks for help
Stefan
  • 160
  • 1
  • 11
-1
votes
2 answers

Is there a way to trace backwards on an XML tree using xmllint?

Currently working on a project using Bash that parses an XML file. For example if I have bookstore.xml: </book> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 03 '20 at 22:40">asked Aug 03 '20 at 22:40</time> <a href="../../users/14018769/mel" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/14018769.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Mel" /> </a> <div class="s-user-card--info"> <a href="../../users/14018769/mel" class="s-user-card--link">Mel</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">31</li> <li class="s-award-bling s-award-bling__bronze" title="4 bronze badges">4</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-60135656"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/60135656/extract-pair-of-values-in-xml-of-charles-proxy-recording-using-bash" class="question-hyperlink">Extract pair of values in xml of Charles proxy recording using bash</a></h3> <div class="excerpt">I have an xml of a Charles proxy recording from which I am trying to find and extract couple of values by using XPath but not quite sure to extract them without hardcoding the xpath. Below is an xml of a single transaction <?xml version="1.0"…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/charles-proxy" class="post-tag grid--cell" title="show questions tagged 'charles-proxy'" rel="tag">charles-proxy</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 09 '20 at 10:31">asked Feb 09 '20 at 10:31</time> <a href="../../users/12866789/macrbu" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/12866789.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="macrbu" /> </a> <div class="s-user-card--info"> <a href="../../users/12866789/macrbu" class="s-user-card--link">macrbu</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="1 bronze badges">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-51043175"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/51043175/is-it-possible-to-concatenate-two-nodes-variables-using-bash-and-xmllint" class="question-hyperlink">Is it possible to concatenate two nodes variables using Bash and xmllint?</a></h3> <div class="excerpt">Is it possible to concatenate two nodes variables using Bash ? i'm trying to contacted this 4 variables To have something like "5216997, Yes, Mark, Request" IncidentId="$(echo "cat /incidents/incident/id/text()" | xmllint --nocdata --shell…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/nodes" class="post-tag grid--cell" title="show questions tagged 'nodes'" rel="tag">nodes</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 26 '18 at 12:40">asked Jun 26 '18 at 12:40</time> <a href="../../users/3347664/user3347664" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/3347664.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="user3347664" /> </a> <div class="s-user-card--info"> <a href="../../users/3347664/user3347664" class="s-user-card--link">user3347664</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">49</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badges">2</li> <li class="s-award-bling s-award-bling__bronze" title="7 bronze badges">7</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-46132545"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/46132545/insert-element-s-td-into-each-row-of-html-table-using-xmlstarlet-via-bash" class="question-hyperlink">Insert element[s] (<td>) into each row of HTML Table using XMLStarlet via Bash</a></h3> <div class="excerpt">I want to extract each html table from a list of links. The code I use is the following: wget -O - "https://example.com/section-1/table-name/financial-data/" | xmllint --html --xpath '//*[@id="financial-data"]/div/table/tbody' - 2>/dev/null >>…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/wget" class="post-tag grid--cell" title="show questions tagged 'wget'" rel="tag">wget</a> <a href="../../questions/tagged/xmlstarlet" class="post-tag grid--cell" title="show questions tagged 'xmlstarlet'" rel="tag">xmlstarlet</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 09 '17 at 16:07">asked Sep 09 '17 at 16:07</time> <a href="../../users/4493366/ava-barbilla" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4493366.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ava Barbilla" /> </a> <div class="s-user-card--info"> <a href="../../users/4493366/ava-barbilla" class="s-user-card--link">Ava Barbilla</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">968</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="18 silver badges">18</li> <li class="s-award-bling s-award-bling__bronze" title="37 bronze badges">37</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-40649738"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/40649738/xmllint-how-to-extract-children-containing-certain-text-to-another-xml" class="question-hyperlink">xmllint: how to extract children containing certain text to another xml</a></h3> <div class="excerpt">I have following xml as an example: <Config> <Version>0</Version> <Model>My model</Model> <ParameterList> <Parameter> <Name>Device.Modelname</Name> <Value>XC60</Value> </Parameter> <Parameter> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/grep" class="post-tag grid--cell" title="show questions tagged 'grep'" rel="tag">grep</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 17 '16 at 08:15">asked Nov 17 '16 at 08:15</time> <a href="../../users/1838569/dundar" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1838569.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Dundar" /> </a> <div class="s-user-card--info"> <a href="../../users/1838569/dundar" class="s-user-card--link">Dundar</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,311</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="14 silver badge">14</li> <li class="s-award-bling s-award-bling__bronze" title="25 bronze badge">25</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-28684998"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-1</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/28684998/xmllint-match-and-extract-value" class="question-hyperlink">xmllint match and extract value</a></h3> <div class="excerpt">I would like to pull only "image" from the xml but I'm getting an error since the first couple ones don't include "image". <?xml version='1.0' encoding='utf-8'?> <document> <job name="Job1"> <type> <description> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 23 '15 at 22:43">asked Feb 23 '15 at 22:43</time> <a href="../../users/4172168/programiss" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4172168.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="programiss" /> </a> <div class="s-user-card--info"> <a href="../../users/4172168/programiss" class="s-user-card--link">programiss</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">255</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="5 silver badge">5</li> <li class="s-award-bling s-award-bling__bronze" title="16 bronze badge">16</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-73773071"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/73773071/getting-data-from-xml-file-in-bash-xmllint-xmlstarlet" class="question-hyperlink">getting data from xml file in bash (xmllint, xmlstarlet)</a></h3> <div class="excerpt">I have xml file with few item section. How i can extract data with xmllint or xmlstarlet tool. I want get an /all/item/environment/os/vendor,name,version fields, but if /all/item/identifier=5555 I can find and output /all/item/identifier xmlstarlet…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/xmlstarlet" class="post-tag grid--cell" title="show questions tagged 'xmlstarlet'" rel="tag">xmlstarlet</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 19 '22 at 12:02">asked Sep 19 '22 at 12:02</time> <a href="../../users/948212/anton-shevtsov" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/948212.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Anton Shevtsov" /> </a> <div class="s-user-card--info"> <a href="../../users/948212/anton-shevtsov" class="s-user-card--link">Anton Shevtsov</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,279</li> <li class="s-award-bling s-award-bling__gold" title="4 gold badges">4</li> <li class="s-award-bling s-award-bling__silver" title="16 silver badges">16</li> <li class="s-award-bling s-award-bling__bronze" title="34 bronze badges">34</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-71286718"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/71286718/finding-specific-date-from-a-webpage" class="question-hyperlink">Finding Specific Date from a webpage?</a></h3> <div class="excerpt">Ok so I have been tackling this for a few days now, I have tried multiple things but this current implementation I believe I am closest to. I am looking to retrieve the last Update: date from the following url:…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/awk" class="post-tag grid--cell" title="show questions tagged 'awk'" rel="tag">awk</a> <a href="../../questions/tagged/wget" class="post-tag grid--cell" title="show questions tagged 'wget'" rel="tag">wget</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 27 '22 at 16:58">asked Feb 27 '22 at 16:58</time> <a href="../../users/16919310/ciaran-reilly" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/16919310.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ciaran Reilly" /> </a> <div class="s-user-card--info"> <a href="../../users/16919310/ciaran-reilly" class="s-user-card--link">Ciaran Reilly</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-53556329"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/53556329/how-to-extract-html-between-tags" class="question-hyperlink">How to extract html between tags</a></h3> <div class="excerpt">I need to extract HTML between two tags using Linux command. For example: A html document can have multiple <h2> tags like below <h2> <a id="id1" name="name1"></a> test1 </h2> <h2> <a id="id2" name="name2"></a> test2 </h2> I need to…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/shell" class="post-tag grid--cell" title="show questions tagged 'shell'" rel="tag">shell</a> <a href="../../questions/tagged/unix" class="post-tag grid--cell" title="show questions tagged 'unix'" rel="tag">unix</a> <a href="../../questions/tagged/awk" class="post-tag grid--cell" title="show questions tagged 'awk'" rel="tag">awk</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 30 '18 at 11:06">asked Nov 30 '18 at 11:06</time> <a href="../../users/6076320/vishnu-sharma" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/6076320.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Vishnu Sharma" /> </a> <div class="s-user-card--info"> <a href="../../users/6076320/vishnu-sharma" class="s-user-card--link">Vishnu Sharma</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">632</li> <li class="s-award-bling s-award-bling__silver" title="5 silver badges">5</li> <li class="s-award-bling s-award-bling__bronze" title="19 bronze badges">19</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-47114719"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/47114719/xpath-html-combine-columns" class="question-hyperlink">xpath html combine columns</a></h3> <div class="excerpt">I'm trying to extract data from socks-proxy.net with the IP and port from the website table. I'm using these commands in linux to get the IP and port. How can I combine theme? wget -q -O - "https://socks-proxy.net" | xmllint --html --xpath…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/xmlstarlet" class="post-tag grid--cell" title="show questions tagged 'xmlstarlet'" rel="tag">xmlstarlet</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 04 '17 at 19:26">asked Nov 04 '17 at 19:26</time> <a href="../../users/2317589/john-mark" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2317589.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="John Mark" /> </a> <div class="s-user-card--info"> <a href="../../users/2317589/john-mark" class="s-user-card--link">John Mark</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">129</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="15 bronze badges">15</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-47108650"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/47108650/xpath-html-get-all-columns-1-and-2-together-and-concatenate-with-column" class="question-hyperlink">xpath html get all columns 1 and 2 together and concatenate with column ":"</a></h3> <div class="excerpt">I have this following command that gets the data from column 2: Table example: <table> <tr> <td>a</td> <td>b</td> <td>c</td> <td>d</td> <td>e</td> </tr> <tr> <td>1</td> <td>2</td> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/linux" class="post-tag grid--cell" title="show questions tagged 'linux'" rel="tag">linux</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/xpath" class="post-tag grid--cell" title="show questions tagged 'xpath'" rel="tag">xpath</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 04 '17 at 07:51">asked Nov 04 '17 at 07:51</time> <a href="../../users/2317589/john-mark" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2317589.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="John Mark" /> </a> <div class="s-user-card--info"> <a href="../../users/2317589/john-mark" class="s-user-card--link">John Mark</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">129</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="15 bronze badges">15</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-73816775"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-5</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/73816775/how-can-i-extract-and-relate-the-value-of-the-child-xml-value-with-the-parent-" class="question-hyperlink">how can i extract and relate the value of the child xml value with the parent one with sed, awk or xmllint in bash unix?</a></h3> <div class="excerpt">I have the following xml: <Flusso cod_flusso="abc"> <Identificativi> <piva_1>000000</piva_1> <piva_2>111111</piva_2> </Identificativi> <Dati> <cod>001100000111111</cod> <mese>01/2021</mese> …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/xml" class="post-tag grid--cell" title="show questions tagged 'xml'" rel="tag">xml</a> <a href="../../questions/tagged/bash" class="post-tag grid--cell" title="show questions tagged 'bash'" rel="tag">bash</a> <a href="../../questions/tagged/awk" class="post-tag grid--cell" title="show questions tagged 'awk'" rel="tag">awk</a> <a href="../../questions/tagged/sed" class="post-tag grid--cell" title="show questions tagged 'sed'" rel="tag">sed</a> <a href="../../questions/tagged/xmllint" class="post-tag grid--cell" title="show questions tagged 'xmllint'" rel="tag">xmllint</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 22 '22 at 14:54">asked Sep 22 '22 at 14:54</time> <a href="../../users/20062485/tisagono" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/20062485.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Tisagono" /> </a> <div class="s-user-card--info"> <a href="../../users/20062485/tisagono" class="s-user-card--link">Tisagono</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/xmllint_page=22" rel="prev" title="Go to page 22">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/xmllint_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/xmllint_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/xmllint_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/xmllint_page=22" rel="" title="Go to page 22">22</a> <div class="s-pagination--item is-selected">23</div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>