Sponsored Content
Top Forums Shell Programming and Scripting extract specific data from xml format file. Post 302158321 by 60doses on Tuesday 15th of January 2008 03:50:08 AM
Old 01-15-2008
Uhmm.. forgot another thing.. I will only need to take the start time if the status is 'send messages', and not 'submit messages'.

Here's another portion from the file:

<LogEvent ID="Timer Start">
<LogEventProperty Name="Event Type" ID="Event Type"><![CDATA[Timer Start]]></LogEventProperty>
<LogEventProperty Name="Start Date" ID="Start Date"><![CDATA[12/13/2007]]></LogEventProperty>
<LogEventProperty Name="Start Time" ID="Start Time"><![CDATA[19:04:46]]></LogEventProperty>
<LogEventProperty Name="End Date" ID="End Date"><![CDATA[12/13/2007]]></LogEventProperty>
<LogEventProperty Name="End Time" ID="End Time"><![CDATA[19:04:46]]></LogEventProperty>
<LogEventProperty Name="Result" ID="Result"><![CDATA[ ]]></LogEventProperty>
<LogEventProperty Name="Failure Reason" ID="Failure Reason"><![CDATA[ ]]></LogEventProperty>
<LogEventProperty Name="Failure Description" ID="Failure Description"></LogEventProperty>
<LogEventProperty Name="Virtual Tester Command ID" ID="Virtual Tester Command ID"><![CDATA[send messagesRCF/MH541/10JUL0700/FRA/T20]]></LogEventProperty>
<LogEventProperty Name="Virtual Tester First Time Stamp" ID="Virtual Tester First Time Stamp"><![CDATA[68798]]></LogEventProperty>
<LogEventProperty Name="Virtual Tester Line Number" ID="Virtual Tester Line Number"><![CDATA[1177]]></LogEventProperty>
<LogEventProperty Name="Operating System" ID="Operating System"><![CDATA[Windows]]></LogEventProperty>
<LogEventProperty Name="OS Version" ID="OS Version"><![CDATA[2003]]></LogEventProperty>
<LogEventProperty Name="Processor" ID="Processor"><![CDATA[Pentium]]></LogEventProperty>
<LogEventProperty Name="Display Resolution" ID="Display Resolution"><![CDATA[1024x768]]></LogEventProperty>
<LogEventProperty Name="Display Color Bits" ID="Display Color Bits"><![CDATA[32]]></LogEventProperty>
<LogEventProperty Name="OS Service Pack" ID="OS Service Pack"><![CDATA[Service Pack 1]]></LogEventProperty>
<LogEventProperty Name="Memory Size" ID="Memory Size"><![CDATA[2048]]></LogEventProperty>
<LogEventProperty Name="Processor Number" ID="Processor Number"><![CDATA[4]]></LogEventProperty>
</LogEvent>
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with shell script to extract data from XML file

Hello Scripting Gurus, I need help with extracting data from the XML file using shell script. The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files. <wfregistry>... (5 Replies)
Discussion started by: yajaykumar
5 Replies

2. Shell Programming and Scripting

sed or awk to extract data from Xml file

Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result : mon titre 1;Createur1;Dossier1 mon titre 1;Createur1;Dossier1 and save it in cvs file (fichier.cvs). FROM this Xml file (test.xml): <playlist version="1"> <trackList> <track>... (1 Reply)
Discussion started by: yeclota
1 Replies

3. Shell Programming and Scripting

How to Append the specific data to the xml file

I have an xml file data as shown below: <impl name="Nortel" is-enabled="true"> <package-mappings> <const-mapping target-state="EndPoint" target-param="cfCNDSubscribed" constant-value="true"/> <const-mapping... (2 Replies)
Discussion started by: ravi_rn
2 Replies

4. UNIX for Dummies Questions & Answers

Extract a specific number from an XML file based on the start and end tags

Hello People, I have the following contents in an XML file ........... ........... .......... ........... <Details = "Sample Details"> <Name>Bob</Name> <Age>34</Age> <Address>CA</Address> <ContactNumber>1234</ContactNumber> </Details> ........... ............. .............. (4 Replies)
Discussion started by: sushant172
4 Replies

5. Shell Programming and Scripting

Data Extract from XML Log File

Please help me out to extract the Data from the XML Log files. So here is the data ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Discussion started by: raghunsi
9 Replies

6. Shell Programming and Scripting

Extract data from XML file

Hi , I have input file as XML. following are input data #complex.xml <?xml version="1.0" encoding="UTF-8"?> <TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: mohan sharma
1 Replies

7. Shell Programming and Scripting

How to extract data from xml file using shell scripting?

Hi evry1, This is my 1st post in this forum.Pls help me I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Discussion started by: arun_kohan
4 Replies

8. Shell Programming and Scripting

How to extract data from XML file using shell scripting?

Hi , I have input file as XML. following are input data #complex.xml Code: <?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies

9. Shell Programming and Scripting

Extract Data from XML file.

Hi Guys, I am in a need to extract data from a xml file. The XML file format is as below. <data jsxnamespace="propsbundle" locales=""> <locale> <!--Error messages starts--> <record jsxid="CHARPAIR001" jsxtext=" must be selected"></record> <record... (1 Reply)
Discussion started by: Showdown
1 Replies

10. Shell Programming and Scripting

Extract the specific tags in a XML file

Hello Shell Gurus, I have a requirement to get the specific tags from a XML file. Here is my code snippet <jdbc-system-resource> <name>SDPData Source</name> <target>AdminServer,osb_server1,soa_server1</target> ... (30 Replies)
Discussion started by: Siv51427882
30 Replies
xparace(3)							SAORD Documentation							xparace(3)

NAME
XPARace - XPA Race Conditions SYNOPSIS
Potential XPA race conditions and how to avoid them. DESCRIPTION
Currently, there is only one known circumstance in which XPA can get (temporarily) deadlocked in a race condition: if two or more XPA servers send messages to one another using an XPA client routine such as XPASet(), they can deadlock while each waits for the other server to respond. (This can happen if the servers call XPAPoll() with a time limit, and send messages in between the polling call.) The reason this happens is that both client routines send a string to the other server to establish the handshake and then wait for the server response. Since each client is waiting for a response, neither is able to enter its event-handling loop and respond to the other's request. This deadlock will continue until one of the timeout periods expire, at which point an error condition will be triggered and the timed-out server will return to its event loop. Starting with version 2.1.6, this rare race condition can be avoided by setting the XPA_IOCALLSXPA environment variable for servers that will make client calls. Setting this variable causes all XPA socket IO calls to process outstanding XPA requests whenever the primary socket is not ready for IO. This means that a server making a client call will (recursively) process incoming server requests while waiting for client completion. It also means that a server callback routine can handle incoming XPA messages if it makes its own XPA call. The semi-public routine oldvalue=XPAIOCallsXPA(newvalue) can be used to turn this behavior off and on temporarily. Passing a 0 will turn off IO processing, 1 will turn it back on. The old value is returned by the call. By default, the XPA_IOCALLSXPA option is turned off, because we judge that the added code complication and overhead involved will not be justified by the amount of its use. Moreover, processing XPA requests within socket IO can lead to non-intuitive results, since incoming server requests will not necessarily be processed to completion in the order in which they are received. Aside from setting XPA_IOCALLSXPA, the simplest way to avoid this race condition is to multi-process: when you want to send a client mes- sage, simply start a separate process to call the client routine, so that the server is not stopped. It probably is fastest and easiest to use fork() and then have the child call the client routine and exit. But you also can use either the system() or popen() routine to start one of the command line programs and do the same thing. Alternatively, you can use XPA's internal launch() routine instead of system(). Based on fork() and exec(), this routine is more secure than system() because it does not call /bin/sh. Starting with version 2.1.5, you also can send an XPAInfo() message with the mode string "ack=false". This will cause the client to send a message to the server and then exit without waiting for any return message from the server. This UDP-like behavior will avoid the server deadlock when sending short XPAInfo messages. SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xparace(3)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy