01-10-2006
getting multiple xml tag
sorry for the trouble......
i have this file that contains the following:
00:00:21 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:21 Sending Message :<EXGC-EXGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>EXGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G33</terminal_id>
<lane_ts>7</lane_ts>
<version>A</version>
<sno>1136908779</sno>
<exit_dt>200601102359</exit_dt>
<gate>3</gate>
<lane>07</lane>
<opr_logon>PD$PRA </opr_logon>
<card_no>003797</card_no>
<nom_hlr_cr_no> </nom_hlr_cr_no>
<nom_pass_ind>Y</nom_pass_ind>
</EXGC-EXGU>
]
00:00:21 Sending Message :<ARGC-ARGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>ARGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G31</terminal_id>
<lane_ts>2</lane_ts>
<version>B</version>
<sno>1136908785</sno>
<ariv_dt>200601102359</ariv_dt>
<gate>3</gate>
<lane>02</lane>
<opr_logon>PD$SDI </opr_logon>
</ARGC-ARGU>
00:00:21 Msg send to Queue=[<ARGC-ARGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>ARGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G31</terminal_id>
<lane_ts>2</lane_ts>
<version>B</version>
<sno>1136908785</sno>
<ariv_dt>200601102359</ariv_dt>
</ARGC-ARGU>
00:00:31 weblogic server=t3://cng3wls8:80
00:00:31 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:41 weblogic server=t3://cng3wls8:80
00:00:41 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:00:41 Sending Message :<EXGC-EXGU xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<trans_id>EXGC</trans_id>
<sys_prefix>GSYS</sys_prefix>
<terminal_id>G33</terminal_id>
<lane_ts>8</lane_ts>
<version>A</version>
</EXGC-EXGU>
00:03:02 weblogic server=t3://cng3wls8:80
00:03:02 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:03:12 weblogic server=t3://cng3wls8:80
00:03:12 Queue key, Queue Name=[GMS_Q,jms/citos/gms/HssQueue]
00:03:12 Sending Message :<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060111000307</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
<pm_n>XB 2062M</pm_n>
<chassis_type>45</chassis_type>
<chassis_ulw>00000</chassis_ulw>
<pager_n>94944694</pager_n>
</pregate>
its a very very huge set of data and here are a part of it. I need to get the bold text out and piped each into a text file.
well the sed codes i try out is this:
sed -e 's_^..:..:.. .*<pregate_<pregate_g' raw.txt > pregate.out
sed -e 's_^..:..:.. .*<EXGC-EXGU_<EXGC-EXGU_g' raw.txt > EXGC.out
sed -e 's_^..:..:.. .*<ARGC-ARGU_<ARGC-ARGU_g' raw.txt > ARGC-ARGU.out
but it doesnt works....
any idea?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We have 2 XML file 1. ORIGINAL.xml file and 2. ATTRIBUTE.xml files, In the ORIGINAL.xml we need some modification as <resourceCode>431048</resourceCode>under <item type="Manufactured"> tag - we need to grab the 431048 value from tag and pass it to database table in unix shell script to find the... (0 Replies)
Discussion started by: balrajg
0 Replies
2. Shell Programming and Scripting
Hi All,
Need your assistance on another xml tag related issue. I have a xml file as below:
<INVOICES>
<INVOICE>
<BILL>
<BILL_NO>1234</BILL_NO>
<BILL_DATE>01 JAN 2011</BILL_DATE>
</BILL>
<NAMEINFO>
<NAME>ABC</NAME>
</NAMEINFO>
</INVOICE>
<INVOICE>
<BILL>
<BILL_NO>5678</BILL_NO>... (12 Replies)
Discussion started by: angshuman
12 Replies
3. Shell Programming and Scripting
Hi All,
Find the following code:
<Universal>D38x82j1JJ
</Universal>
I want to retrieve the value of <Universal> tag as below:
Please help me. (3 Replies)
Discussion started by: mjavalkar
3 Replies
4. Shell Programming and Scripting
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies
5. Shell Programming and Scripting
I have this XML file -
<gp>
<mms>1110012</mms>
<tg>988</tg>
<mm>LongTime</mm>
<lv>
<lkid>StartEle=ONE, Desti = Motion</lkid>
<kk>12</kk>
</lv>
<lv>
<lkid>StartEle=ONE, Source = Velocity</lkid>
<kk>2</kk>
</lv>
<lv>
... (3 Replies)
Discussion started by: NeedASolution
3 Replies
6. Shell Programming and Scripting
Hi Guys
Here is my Input :
<?xml version="1.0" encoding="UTF-8"?>
<xn:MeContext id="01736">
<xn:VsDataContainer id="01736">
<xn:attributes>
<xn:vsDataType>vsDataMeContext</xn:vsDataType>
... (12 Replies)
Discussion started by: pareshkp
12 Replies
7. Shell Programming and Scripting
Hi All,
Can someone tell me how can we create same xml tag lines based on the number of lines present in other file and replace the Name variable vaule present in other file.
basically I have this xml line
<typ:RequestKey NameType="RIC" Name="A1" Service="DDA"/>
and say I... (4 Replies)
Discussion started by: Optimus81
4 Replies
8. Shell Programming and Scripting
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies
9. Shell Programming and Scripting
Hi Forum.
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
Discussion started by: pchang
19 Replies
10. UNIX for Beginners Questions & Answers
I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file:
<EMAIL>***</EMAIL>
<CUSTOMER_ID>****</CUSTOMER_ID>
<BRANDID>***</BRANDID>
Now I want to grep the values of all these specified... (1 Reply)
Discussion started by: shubh752
1 Replies
LEARN ABOUT SUNOS
imqdbmgr
imqdbmgr(1M) System Administration Commands imqdbmgr(1M)
NAME
imqdbmgr - manage a plugged-in JDBC-compliant Message Queue data store
SYNOPSIS
/usr/bin/imqdbmgr subcommand argument [ [option...]]
/usr/bin/imqdbmgr -h | -help
/usr/bin/imqdbmgr -v | -version
DESCRIPTION
The imqdbmgr utility creates and manages a Java DataBase Connectivity (JDBC) compliant database used for Message Queue persistent storage.
The database can be either embedded or external. To use a JDBC-compliant database (and the imdbmgr utility), you need to first set a number
of JDBC-related properties in the broker instance configuration file. See the Sun Java System Message Queue Administrator's Guide for addi-
tional information.
imqdbmgr supports four management subcommands. These subcommands, and their corresponding arguments and options follow the imqdbmgr command
on the command line. See USAGE and OPTIONS.
The following subcommands are supported:
create
Create a Message Queue database schema.
delete
Delete Message Queue database tables in the current data store.
recreate
Delete Message Queue database tables and recreate Message Queue database schema in the curent data store.
reset
Reset the database table lock to allow other processes to access database tables.
The imqdbmgr subcommands support the following arguments:
all
Indicates the subcommand applies to the data store, as well as the database tables.
lck
Indicates the subcommand applies to the database table lock.
oldtbl
Indicates the subcommand applies to an older version of the database tables.
tbl
Indicates the subcommand applies to the database tables only.
OPTIONS
The following options are supported:
-b brokerName Specify the broker instance name and corresponding instance configuration properties. If this option is not speci-
fied, the default broker instance is assumed.
Use this option with the create, delete, recreate, or reset subcommands.
-D property=value Set system property property to value.
Use this option with the create, delete, recreate, or reset subcommands.
-h | -help Display usage help. Execute nothing else on the command line.
-p password Specify the database password.
Use this option with the create, delete, recreate, or reset subcommands.
-u userName Specify the database user name.
Use this option with the create, delete, recreate, or reset subcommands.
-v | -version Display version information. Execute nothing else on the command line.
USAGE
The following subcommands and associated arguments are supported:
create all
Create a new embedded data store and Message Queue database schema for a specified or default broker instance.
create tbl [-u userName] [-p password]
Create Message Queue database schema in an existing data store for a specified or default broker instance.
delete tbl [-u userName] [-p password]
Delete Message Queue database tables in the current data store for a specified or default broker instance.
delete oldtbl [-u userName] [-p password]
Delete the earlier version of Message Queue database tables. Used after the data store has been automatically migrated to the current
version of Message Queue.
recreate tbl [-u userName] [-p password]
Delete Message Queue database tables and recreate Message Queue database schema in the current data store for a specified or default
broker instance.
reset lck
Reset the database table lock to allow other processes to access database tables.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command:
IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/var/imq/instances/brokerName/dbstore
Recommended directory in which to create an embedded database.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWiqu |
+-----------------------------+-----------------------------+
SEE ALSO
imqadmin(1M), imqbrokerd(1M), imqcmd(1M), imqusermgr(1M), imqkeytool(1M), imqobjmgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide
SunOS 5.10 29 Mar 2004 imqdbmgr(1M)