12-08-2005
Read xml file
Iam new to shell script.
How to read xmlfile using shellscript(without awk),and Store record by record in file .
My xml file:
<root>
<header>
<HeaderData1>header1</HeaderData1>
<HeaderData2>header2</HeaderData2>
</header>
<detailsRecord>
<DetailRecord1>detail1</DetailRecord1>
<DetailRecord2>detail2</DetailRecord2>
<detailsRecord>
<detailsRecord>
<DetailRecord1>detail3</DetailRecord1>
<DetailRecord2>detail4</DetailRecord2>
<detailsRecord>
<trailer>
<trailer>trailer1</trailer>
</trailer>
</root>
Thanks Lot.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
What is a good way to read elements of an xml file? i did try xmllint it doesnt provide a function to output values of a tree. In the below example when i specify from Family2 I need the name of the father then the output should be DAVE. Appreciate any help provided in this regards.
Many... (6 Replies)
Discussion started by: ahmedwaseem2000
6 Replies
2. Shell Programming and Scripting
Hi
I am new to this forum.
I have few XML files and from each xml file I want to copy some specific 50 no of lines and copy them to some other file.
how to do that? pls help.. (5 Replies)
Discussion started by: pritam1980
5 Replies
3. Shell Programming and Scripting
Hello Everybody,
I have a question on reading the data from XML file through KSH shell script. In the below file I need to collect the patient control no and its respective insured id. I need to have pair of these values in single line separated by some special character, so that I could use... (2 Replies)
Discussion started by: swame_sp
2 Replies
4. Shell Programming and Scripting
hi
i am quite new to shell scripting and need help in reading and writing in xml file
i have an xml file with format:
<main>
<store>
<name>ABC</name>
<flag>0</flag>
<size>123<size>
</store>
<store>
<name>DEF</name>
... (2 Replies)
Discussion started by: kichu
2 Replies
5. Shell Programming and Scripting
Dear All,
I have one log file and it contains lot of XML as below.
... (1 Reply)
Discussion started by: murtujak
1 Replies
6. Shell Programming and Scripting
Hello,
I have a xml file as shown below. I want to parse the file and store data in variables.
xml file looks like:
<TEST NAME="DataBaseurl">jdbc:oracle:thin:@localhost:1521:ora10</TEST>
<TEST NAME="Databaseuser">Pradeep</TEST>
......
and many other such lines
i want to read this file and... (2 Replies)
Discussion started by: pradeepmacha
2 Replies
7. Shell Programming and Scripting
I have a file something like this:aaaa.xml content of the file is
0,<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storeInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s>
<BRANCH_NO>3061</BRANCH_NO>
<BRANCH_NAME>GREEN EXPRESS</BRANCH_NAME> ... (4 Replies)
Discussion started by: kmanivan82
4 Replies
8. Shell Programming and Scripting
Hi ,
I have a file like below.I want all the content in a single line excluding the XML.How can i proceed?
t=21
y=23
rg=xyz
.....
<xmlstarts>
.
.
<xmlends>
lk=99
lo=09 (3 Replies)
Discussion started by: chetan.c
3 Replies
9. Shell Programming and Scripting
Hi unix Gurus,
I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information.
For example
<SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (5 Replies)
Discussion started by: SmilePlease
5 Replies
10. Red Hat
Hey , can we read an xml file and make changes in it through shell script.
Thanks (4 Replies)
Discussion started by: ramsavi
4 Replies
LEARN ABOUT DEBIAN
zktreeutil
ZKTREEUTIL(1) User Commands ZKTREEUTIL(1)
NAME
zktreeutil - manual page for zktreeutil 0.0
SYNOPSIS
zktreeutil [args-and-values]+
DESCRIPTION
ZK-tree utility for managing ZK-tree with XML import/export, viewing diff between live and saved ZK-tree and performing incremental update
of the same.
--import or -I:
Imports the zookeeper tree from XML file. Must be specified with --zookeeper AND --xmlfile options. Optionally takes --path for
importing subtree
--export or -E:
Exports the zookeeper tree to XML file. Must be specified with --zookeeper option. Optionally takes --path for exporting subtree
--update or -U:
Updates zookeeper tree with changes from XML file. Update operation is interactive unless specified with --force option. Must be
specified with --zookeeper AND --xmlfile options. Optionally takes --path for updating subtree.
--diff or -F:
Creates a list of diff actions on ZK tree based on XML data. Must be specified with --zookeeper OR --xmlfile options. Optionally
takes --path for subtree diff
--dump or -D:
Dumps the entire ZK (sub)tree to standard output. Must be specified with --zookeeper OR --xmlfile options. Optionally takes --path
and --depth for dumping subtree.
--xmlfile=<filename> or -x <filename>:
Zookeeper tree-data XML file.
--path=<znodepath> or -p <znodepath>:
Path to the zookeeper subtree rootnode.
--depth=<tree-depth> or -d <tree-depth>:
Depth of the ZK tree to be dumped (ignored for XML dump).
--force or -f: Forces cleanup before import; also used for forceful
update. Optionally be specified with --import and --update.
--help or -h:
prints this message
--zookeeper=<zkhosts> or -z <zkhosts>:
specifies information to connect to zookeeper.
zktreeutil 0.0 July 2012 ZKTREEUTIL(1)