Questions tagged [xml]
A simple, very flexible text format that stands for eXtensible Markup Language.
431 questions
0
votes
1
answer
78
views
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 ...
-1
votes
2
answers
85
views
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 ...
1
vote
3
answers
315
views
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="...
1
vote
2
answers
88
views
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 ...
-2
votes
1
answer
84
views
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 ........
1
vote
3
answers
82
views
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 ...
-1
votes
3
answers
162
views
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 ...
3
votes
3
answers
194
views
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&...
-1
votes
3
answers
138
views
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/...
4
votes
4
answers
1k
views
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 +...
0
votes
2
answers
792
views
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 ...
0
votes
3
answers
281
views
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 ...
0
votes
1
answer
664
views
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. ...
0
votes
1
answer
85
views
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=&...
3
votes
1
answer
446
views
'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>
&...