Questions tagged [xml]
A simple, very flexible text format that stands for eXtensible Markup Language.
431 questions
0votes
1answer
52views
Wget download wrong content
I'm trying to download a specific sitemap.xml (https://www.irna.ir/sitemap/all/sitemap.xml). The problem is that when you load the specific sitemap.xml for a few seconds one white page with a header ...
-1votes
2answers
64views
How to print the content inside the tag using grep command? [closed]
In linux, how can we use grep command to print the contents that comes inside this tag? <errorPayload>XXXXXXXX</errorPayload> I tried grep -Po '<errorPayload>' abc.log, but it only ...
1vote
3answers
293views
Sed command not matching and replacing pattern on multi line xml
I have many XML files as below where i would like to replace a string with a new string. I cannot seem to get the sed command to work on the xml files. <form version="1.1" theme="...
1vote
2answers
71views
Use sed to insert a character in an xml file
I have an xml file with content following this format: <type:color>000000</type:color> <type:color>FFFFFF</type:color> The information within the tags are hex colors (many ...
-2votes
1answer
72views
Parse txt file on basis of occurrence of a tag in Linux
I am trying to parse a txt file containing xml "messages"in linux, something like this <Document abc xyz .....> <hji> xyz </hji> </Document> <Document abc xyz ........
1vote
3answers
63views
using grep (or something similar) to find when rows are missing
I'm trying to find when certain rows are missing in a file. See below. In each record, there is an ItemNumber, MessageNumber, NewItemNumber, and ConfirmedQty field. Is there a way to find ItemNumber ...
-1votes
3answers
129views
sed inline not working to modify XML-style input
the problem is that I cannot put the complete command on a line with SED, I had already done it but with those file it does not work: my exemple : <file>Documents/time/text1</file> //2X ...
3votes
3answers
183views
SED command to delete a forward slash "/" between 2 tags
I am using Linux, and I want to use sed to delete a forward slash (/) between 2 tags. From this: input.xml... <file>/text</file> <file>/text2</file> <file>/text</file&...
-1votes
3answers
109views
sed command gets me error Label too long: on solaris
Given database name oltt206 or DB01 i wish to extract its respective username, password and connection string from the xml below: wladmin@myremhost:/tmp$ cat /web/bea_apps/uat/Tomcat_Home_v9.0.56/...
4votes
4answers
1kviews
Can I extract complete dates from file with grep command?
I need help using grep to extract a zoned date time from a file on a Linux system. Source file is a XML with the data below: <item start="20231010073000 +0100" stop="20231010100000 +...
0votes
2answers
736views
Shell command- to extract a string from xml file
There is a function Parse_xml as below Parse_XML() { TDIR=$1 _VERSION= _REVISION= _FILENAME= _COMPONENT= _DESCRIPT= _ISITOA=0 _NOLOG=0 _OAVERSION= local ...
0votes
3answers
216views
How to extract table of contents from fb2 book?
I have a book in fb2 format. I want to print the table of contents, containing names and numbers of "parts", "chapters", "episodes" and so on. Is there a way I can do ...
0votes
1answer
600views
libvirt rejects passthrough USB in XML
On a Debian 10 machine, I have a KVM VM with Windows 10. It runs fine. The libvirt version is 5.0.0-4+deb10u1. I want the VM to recognize a video camera that is attached to the Debian host via USB. ...
0votes
1answer
70views
extract block from XML with different ending tags (<tag>...</tag> vs <tag ... />)
Given an XML with some blocks ending within the same tag and others with a separate tag: <parent name="parent_1" team="team_a"> <child name="child_1" team=&...
3votes
1answer
413views
'xmlstarlet edit' using a variable as XPath
When you follow the doc: xmlstarlet edit --help you can read that --var can be used to declare a XPath expression as a variable. Generating moc file: cat<<EOF > /tmp/file.xml <root> &...