Hi,
I have a situation where I want to replace some occurrences of ".jsp" into ".html" inside a text file.
For Example:
If a pattern found like <a href="http://www.mysite.com/mypage.jsp"> it should be retained.
But if a pattern found like <a href="../mypage.jsp"> it should be changed to... (4 Replies)
Hi,
I need to remove some lines from an XML file is the value within a tag is empty.
Imagine this scenario,
<acd><acdID>2</acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
<acd><acdID></acdID><logon></logon></acd>
I... (3 Replies)
Hi All,
I have a large xml file of invoices. The file looks like below:
<INVOICES>
<INVOICE>
<NAME>Customer A</NAME>
<INVOICE_NO>1234</INVOICE_NO>
</INVOICE>
<INVOICE>
<NAME>Customer A</NAME>
<INVOICE_NO>2345</INVOICE_NO>
</INVOICE>
<INVOICE>
<NAME>Customer A</NAME>... (9 Replies)
I am generating a output:
Name Count_1 Count_2
abc 12 12
def 15 14
ghi 16 16
jkl 18 18
mno 7 5
I am sending the output in html email, I want to add the code:
<font color="red"> NAME COLUMN record </font>
for the Name... (8 Replies)
I have a really big XML file. I need copy the value of one tag inside another one tag. I try to publish one example.
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1">Rai 1</channel>
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1 +2HD">Rai 1... (6 Replies)
Hi ,
I have a situation where I need to search an xml file for the presence of a tag
<FollowOnFrom> and also , presence of partial part of the following tag <ContractRequest _LoadId and if these 2 exist ,then
extract the value from the following tag <_LocalId> which is
"CW2094139". There... (2 Replies)
Dear Unix guru,
I have a .XML file which is being used to load data to oracle. This file comes on unix box and one of the tag in xml is oracle key word. I want to find that tag and replace with new tag on the fly
For example
I will get one of the tag in xml is as below
<from>Test Test... (12 Replies)
Hi All,
I have a working script as below.
echo "Files loaded with $(cat /var/tmp/script.X1.out)" | mail -s "Files loaded with return code" mailid
This script takes the output from script.X1.out file and appends the text "Files loaded with return code" and sends the email. Now what I want... (5 Replies)
Discussion started by: midhun3108
5 Replies
LEARN ABOUT SUSE
xmlstarlet
XMLSTARLET(1) xmlstarlet Manual XMLSTARLET(1)NAME
xmlstarlet - command line XML/XSLT toolkit
SYNOPSIS
xmlstarlet [<options>] [<command>] [<cmd-options>]
INTRODUCTION
XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files us-
ing simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.
This set of command line utilities can be used by those who deal with many XML documents on UNIX shell command prompt as well as for auto-
mated XML processing with shell scripts.
OPTIONS --version
Display the version of xmlstarlet.
--help Display help.
COMMANDS
Type: xml <command> --help <ENTER> for command help
Available commands include:
ed (or edit)
Edit/update XML document(s).
sel (or select)
Select data or query XML document(s) (XPATH, etc).
tr (or transform)
Transform XML documents(s) using XSLT.
val (or validate)
Validate XML document(s) (well-formed/DTD/XSD/RelaxNG).
fo (or format)
Format XML document(s).
el (or elements)
Display element structure of XML document.
c14n (or canonic)
XML canonicalization.
ls (or list)
List directory as XML.
esc (or escape)
Escape special XML characters.
unesc (or unescape)
Unescape special XML characters.
pyx (or xmln)
Convert XML into PYX format (based on ESIS - ISO 8879).
p2x (or depyx)
Convert PYX into XML.
REFERENCES
XMLStarlet is a command line toolkit to query/edit/check/transform XML documents (for more information see http://xmlstar.source-
forge.net/).
AUTHOR
Mikhail Grushinskiy.
XMLSTARLET(1)