07-16-2007
extract data from xml- shell script using awk
Hi,
This is the xml file that i have.
- <front-servlet platform="WAS4.0" request-retriever="SiteMinder-aware" configuration-rescan-interval="60000">
<concurrency-throttle maximum-concurrency="50" redirect-page="/jsp/defaulterror.jsp" />
- <loggers>
<instrumentation class="com.american.util.frontservlet.DefaultInstrumentation" activation-tag="logRequest" enabled="false" />
<page-hit class="com.american.util.eec.adapter.mvc.DefaultPageHitCapture" enabled="false" />
</loggers>
<input-pipeline />
<output-pipeline />
- <request-handlers>
<handler class="com.american.sso.web.requesthandler.LogonHandler" request-name="un_logon" />
<handler class="com.american.sso.web.requesthandler.LogonHandler" request-name="un_logonchpwd" />
<handler class="com.american.sso.web.requesthandler.RequestParserHandler" request-name="auth_reqparser" />
</request-handlers>
<error-page>/jsp/defaulterror.jsp</error-page>
<request-tag>request_type</request-tag>
- <page-map resolution-strategy="strict">
<page name="logon_page" path="/jsp/logon.jsp" type="local" />
<page name="logonchpwd_page" path="/jsp/logonchpwd.jsp" type="local" />
<page name="help_page" path="/jsp/help.jsp" type="local" />
<page name="error_page" path="/jsp/defaulterror.jsp" type="local" />
<page name="requestparser_page" path="/jsp/JSPTest.jsp" type="local" />
</page-map>
</front-servlet>
I need to extract the handler classs name under the request-handler xml tab.
Could anyone help me out with this?
Thanks a lot.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as
AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" />
<AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12... (3 Replies)
Discussion started by: allways4u21
3 Replies
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Hi All,
I will be getting a huge XML file with a lot of records in it. I need to convert it into multiple data files.
SAMPLE XML FILE
<ABSProductCatalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <ProductSalesHierachy>
- <Portfolios>
- <Portfolio productCode="P1">
... (8 Replies)
Discussion started by: ragha81
8 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell scripting. I need to extract data between repeating tags from an xml file and store the data in an array to process it further.
<ns1:root xmlns:ns1="http://example.com/config">
<ns1:interface>in1</ns1:interface>
<ns1:operation attribute1="true" attribute2="abd"... (2 Replies)
Discussion started by: sailendra
2 Replies
6. Shell Programming and 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
7. Shell Programming and 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
8. Shell Programming and Scripting
Hi
I have xml file with multiple records and would like to extract records from xml with specific condition if specific tag is present extract entire row otherwise skip .
<logentry revision="21510">
<author>mantest</author>
<date>2015-02-27</date>
<QC_ID>334566</QC_ID>... (12 Replies)
Discussion started by: madankumar.t@hp
12 Replies
9. Shell Programming and Scripting
hi all, here is the sample log file and these errors are repeated in log file..
i need all the repeated time stamp ,severity and message tags needs to print in output file.. through shell script
<log-message>
<timestamp>2019-03-13T04:52:49.648-05:00</timestamp>
<severity>ERROR</severity>... (17 Replies)
Discussion started by: ravi
17 Replies
10. UNIX for Beginners Questions & Answers
Hi everyone,
So i'm struggling with an xml (log file) where we get information about some devices, so the logfile is filled with multiple "blocks" like that.
Based on the <devId> i want to extract this part of the xml file. If possible I want it to have an script for this, cause we'll use... (5 Replies)
Discussion started by: Pouky
5 Replies
LEARN ABOUT DEBIAN
autodia::handler::torque
Autodia::Handler::Torque(3pm) User Contributed Perl Documentation Autodia::Handler::Torque(3pm)
NAME
Autodia::Handler::Torque.pm - AutoDia handler for Torque xml database schema
INTRODUCTION
This provides Autodia with the ability to read Torque Database Schema files, allowing you to convert them via the Diagram Export methods to
images (using GraphViz and VCG) or html/xml using custom templates or to Dia.
SYNOPSIS
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::dia->New(\%Config);
$handler->Parse(filename); # where filename includes full or relative path.
Description
The Torque handler will parse the xml file using XML::Simple and populating the diagram object with class, superclass, and relationships
representing tables and relationships.
The Torque handler is registered in the Autodia.pm module, which contains a hash of language names and the name of their respective
language.
An example Torque database schema is shown here - its actually a rather nice format apart from the Java studlyCaps..
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_0_1.dtd">
<database name="INTERPLANETARY">
<table name="CIVILIZATION">
<column name="CIV_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/>
<column name="NAME" required="true" type="LONGVARCHAR"/>
</table>
<table name="CIV_PEOPLE">
<column name="CIV_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="PEOPLE_ID" required="true" primaryKey="true" type="INTEGER"/>
<foreign-key foreignTable="CIVILIZATION">
<reference local="CIV_ID" foreign="CIV_ID"/>
</foreign-key>
<foreign-key foreignTable="PEOPLE">
<reference local="PEOPLE_ID" foreign="PEOPLE_ID"/>
</foreign-key>
</table>
<table name="PEOPLE">
<column name="PEOPLE_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/>
<column name="NAME" required="true" size="255" type="VARCHAR"/>
<column name="SPECIES" type="INTEGER" default="-2"/>
<column name="PLANET" type="INTEGER" default="-1"/>
</table>
</database>
METHODS
CONSTRUCTION METHOD
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::Torque->New(\%Config); This creates a new handler using the Configuration hash to provide rules selected at
the command line.
ACCESS METHODS
$handler->Parse(filename); # where filename includes full or relative path.
This parses the named file and returns 1 if successful or 0 if the file could not be opened.
SEE ALSO
Autodia
Torque
Autodia::Handler
perl v5.12.4 2009-02-16 Autodia::Handler::Torque(3pm)