Sponsored Content
Full Discussion: getting multiple xml tag
Top Forums Shell Programming and Scripting getting multiple xml tag Post 95381 by forevercalz on Tuesday 10th of January 2006 10:22:41 PM
Old 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

XML tag replacement from different XML file

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

Extract multiple xml tag value into CSV format

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

How to retrieve the value from XML tag whose end tag is in next line

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

How to add the multiple lines of xml tags before a particular xml tag in a file

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

Using shell command need to parse multiple nested tag value of a XML file

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

XML Parse between to tag with upper tag

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

Creating multiple xml tag lines in a file

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

To search for a particular tag in xml and collate all similar tag values and display them count

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

Moving XML tag/contents after specific XML tag within same file

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

Grepping multiple XML tag results from XML file.

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
asadmin-list-jms-resources(1AS) 				   User Commands				   asadmin-list-jms-resources(1AS)

NAME
list-jms-resources - gets all the JMS resources SYNOPSIS
list-jms-resources --user admin_user [--password admin_password][--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] [--restype resource_type] Gets all the JMS resources. This command can only be run remotely. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. --echo setting to true will echo the command line statement on the standard output. --interactive prompts you for the required options that are not already specified. --restype JMS resource type which can be: javax.jms.Topic, javax.jms.Queue, javax.jms.TopicConnectionFactory, javax.jms.QueueConnectionFactory. Example 1: Using the list-jms-resources command to list all JMS resources asadmin> list-jms-resources jms/Queue jms/Topic jms/QueueConnectionFactory jms/DurableTopicConnectionFactory Command list-jms-resources executed successfully Example 2: Using the list-jms-resources command to list JMS resources of a specified type asadmin> list-jms-resources --restype javax.jms.TopicConnectionFactory jms/DurableTopicConnectionFactory jms/TopicConnectionFactory Command list-jms-resources executed successfully EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-jms-resource(1AS), asadmin-delete-jms-resource(1AS) J2EE 1.4 SDK March 2004 asadmin-list-jms-resources(1AS)
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy