01-09-2009
how to search a value from a xml
I have a file which has following content.
<drdata_export>
<drdata>
<tags>
<timestamp>1231420399:617026000</timestamp>
<from_ip_address>67.178.40.168</from_ip_address>
<to_ip_address>76.96.6.6</to_ip_address>
<cause_code>502</cause_code>
<protocol_type>2001</protocol_type>
<sip_from_tag>1_1103_f4755_5u06_CtkMB7E42B</sip_from_tag>
<sip_from_display_name>RUFF LINDA</sip_from_display_name>
<sip_to_tag>aprqngfrt-1flif20000020</sip_to_tag>
<call_id>2030470795@CHCIILNQPS1AA.SSG.COMCAST.NET</call_id>
<request>INVITE</request>
actaully i want to extract the value 2001 which is next to <protocol_type> .
can any one please help me on this?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to search for a pattern like :
<A:UserAttr Name="ACTIVITY_ID">
<A:Value>1111120</A:Value>
</A:UserAttr>
Let us the there is a dir /tmp that contains 5 xml file. each of them multiple above tags in the file. If found all the three line would be... (2 Replies)
Discussion started by: tictactoe
2 Replies
2. Shell Programming and Scripting
Hi All,
Good day
Here is my data:
<Journal>
<JournalCode>2</JournalCode>
<JournalType>L</JournalType>
<JournalEntry>SG</JournalEntry>
<JournalAmount>-0.05</JournalAmount>
</Journal>
Problem:
1) I need to query the above tags in xml. Which is from the header <Journal>... (4 Replies)
Discussion started by: lutinoman
4 Replies
3. Shell Programming and Scripting
hi ,
i m having a html file and this file looks like this
<ssl>
<name>PIA</name>
<enabled>true</enabled>
<listen-port>39370</listen-port>
</ssl>
<log>
<name>PIA</name>
</log>
<execute-queue>
<name>weblogic.kernel.Default</name>
... (7 Replies)
Discussion started by: becksram123
7 Replies
4. Shell Programming and Scripting
Hello Unix Users,
I am very new to Unix so I am not sure how do I do the following.
I need a script such that when I type the following in the command prompt
> . scriptName.sh wordToBeReplaced DirectoryLocation
will find the word someword located in a somefile.xml in DirectoryLocation... (8 Replies)
Discussion started by: 5211171
8 Replies
5. Shell Programming and Scripting
Hi All,
I have xml file,i am tring to use awk to search pattern as: <Password>x</Password>
and Replace with:
<Password>y</Password>
please any one can help to solve this using awk and awk only. (4 Replies)
Discussion started by: islam2666
4 Replies
6. UNIX for Advanced & Expert Users
I have a xml file like below. I want to search in <msg>, if found corresponding tag path needs to fetch.
for eg: for the message 'RM1659 Boeing Exception Management' it should return /trunk/talend/source/SITA_SP7/Job_Designs/DeferredOutputs/SmartViewFiles/DO_Smartview.zip
For message it can... (2 Replies)
Discussion started by: svenkatareddy
2 Replies
7. Shell Programming and Scripting
Hi,
I have an XML file with around 1 billion rows in it and i am trying to find the number of times a particular tag occurs in it. The solution i am using works but takes a lot of time (~1 hr) .Please help me with an efficient way to do this.
Lets say the input file is
<Root>
... (13 Replies)
Discussion started by: Sheel
13 Replies
8. Shell Programming and Scripting
Hi All
i need to replace the url1 inside <remote> tag in below xml in first instance and in the second instance with url2.
any help appreciated
<locations>
<hudson.scm.SubversionSCM_-ModuleLocation>
<remote>https://svn2015.com/svn/repos/internalshard</remote>
... (4 Replies)
Discussion started by: madankumar.t@hp
4 Replies
9. Shell Programming and Scripting
I want to extract XML block surrounding search string
Ex: print XML block for string "myapp1-ear" surrounded by "<application> .. </application>"
Input XML:
<?xml version="1.0" encoding="UTF-8"?>
<deployment-request>
<requestor>
<first-name>kchinnam</first-name>
... (16 Replies)
Discussion started by: kchinnam
16 Replies
10. Shell Programming and Scripting
Hi All,
I'm new to sed.
In following XML file
<interface type='direct'>
<mac address='52:54:00:86:ce:f6'/>
<source dev='eno1' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
... (8 Replies)
Discussion started by: varunrapelly
8 Replies
LEARN ABOUT CENTOS
netrom
NETROM(4) Linux Programmer's Manual NETROM(4)
NAME
AF_NETROM - NET/ROM amateur packet radio protocol family
DESCRIPTION
NET/ROM is a protocol used extensively by radio amateurs. The Linux NET/ROM protocol family permits access to these protocols via the stan-
dard networking socket metaphor.
The NET/ROM protocol layer only supports connected mode. IP traffic may be stacked on top of NET/ROM frames using a non-standard extension
to the NET/ROM protocol.
The only mode of operation is connected mode which is the mode used for a socket of type SOCK_SEQPACKET (stream sockets are not available
in NET/ROM). This requires that the user ensures output data is suitably packetised, and that input data is read a packet at a time into a
buffer of suitable size.
NET/ROM addresses consist of 6 ascii characters and a number called the SSID. These are encoded into a sockaddr_ax25 structure which is
provided to the relevant system calls.
NET/ROM has some unusual properties. Notably in a multi-user system an AX.25 address is often associated with a user, and some users may
not have such an association. a set of ioctl calls are provided to manage an association table.
NET/ROM supports the following socket options for SOL_NETROM. NETROM_T1 is the T1 timer in 1/10ths of a second, NETROM_T2 is the T2 timer
in 1/10ths of a second. NETROM_N2, the retry counter is also configurable. There is no 'infinite retry' option supported however. It is
possible for an application to request that the NET/ROM layer return the NET/ROM header as well as the application data, this is done via
the NETROM_HDRINCL socket option.
SEE ALSO
call(1), socket(2), setsockopt(2), getsockopt(2), nrbroadcast(5), nrports(5), netromd(8), noderest(8), nodesave(8), nrparms(8).
AUTHOR
Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>
Linux 25 July 1996 NETROM(4)