01-23-2008
Read elements of a xml file??????
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 thanks.
for instance:
Quote:
Family1 ---> Father----->JOHN
Family1 --->Mother----->ANN
Family2 ---> Father----->DAVE
Family2 ---> MOM----->LISA
<TREE>
<Family1>
<Father>
<name = John />
</Father>
<Mother>
<name = ANN />
</Mother>
</Family1>
<Family2>
<Father>
<name=DAVE />
</Father>
<Mother>
<name= Lisa />
</Mother>
</Family2>
</TREE>
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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>
... (2 Replies)
Discussion started by: ram2s2001
2 Replies
2. Shell Programming and Scripting
I'm trying to write a script to help automate some VERY tedious manual tasks.
I have groups of fairly large XML files (~3mb+) that I need to edit.
I need to look through the files and parse the XML looking for a certain flag contained in a field. If I find this flag (an integer value) I need... (4 Replies)
Discussion started by: J-Hon
4 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
Hi Friends
Im so confused with using 'for' loop in ksh. I have a xml like the following:
<serviceProvider>
<serviceProviderID>1</serviceProviderID>
<serviceProviderName>Balesh</serviceProviderName>
<serviceFeeAmount>30.00</serviceFeeAmount>
</serviceProvider>... (2 Replies)
Discussion started by: balesh
2 Replies
6. 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
7. 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
8. Shell Programming and Scripting
Hi ,
I have an XML like this.
<Request>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<version>v44</version><messageId>7247308192</messageId><timeToLive>72000000000</timeToLive>
</Request>.
I want to extract on version and messageId.
As in my output... (13 Replies)
Discussion started by: chetan.c
13 Replies
9. 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
10. UNIX for Beginners Questions & Answers
Hi,
I have a requirement to extract specific element value dynamically from XML message.
Here is the sample message:
<File>
<List>
<main>
<dir>doc/store834/archive</dir>
<count>5</count>
</main>
<main>
<dir>doc/store834/extract</dir>
<count>6</count>
</main>
<main> ... (3 Replies)
Discussion started by: renukeswar
3 Replies
LEARN ABOUT DEBIAN
ann2fig
ANN2FIG(1) User Commands ANN2FIG(1)
NAME
ann2fig - Dump ANN tree structure in Fig format
SYNOPSIS
ann2fig [-upi scale] [-x low_x] [-y low_y]
[-sz size] [-dx dim_x] [-dy dim_y] [-sl dim value]*
[-ps pointsize] file
DESCRIPTION
This program inputs an ann dump file of a search structure perhaps along with point coordinates, and outputs a fig (Ver 3.1) file (see
fig2dev (1)) displaying the tree. The fig file may then be displayed using xfig, or converted to any of a number of other formats using
fig2dev.
If the dimension is 2 then the entire tree is displayed. If the dimension is larger than 2 then the user has the option of selecting which
two dimensions will be displayed, and the slice value for each of the remaining dimensions. All leaf cells intersecting the slice are
shown along with the points in these cells.
OPTIONS
-upi scale
fig units per inch (default = 1200)
-x low_x -y low_y
x and y offset of upper left corner (inches) (default = 1)
-sz size
maximum side length of figure (in inches) (default = 5)
-dx dim_x
horizontal dimension (default = 0)
-dy dim_y
vertical dimension (default = 1)
-sv value
default slice value (default = 0)
-sl dim value
each such pair defines the value along the given dimension at which to slice. This may be supplied for all dimensions except dim_x and
dim_y.
-ps pointsize
size of points in fig units (def = 10)
file
file (input=file.dmp, output=file.fig)
AUTHOR
David Mount
COPYRIGHT
This man page is Copyright (C) 2007 Rafael Laboissiere <rafael AT debian DOT org> and released under the GNU GPL, version 3 or later. It
was written for the Debian distribution but may be used by others.
SEE ALSO
fig2dev(1) ann_sample(1)
ANN 1.1.1 2011-12-10 ANN2FIG(1)