Sponsored Content
Top Forums Shell Programming and Scripting How to retrieve value from xml tags Post 302446457 by rdcwayx on Wednesday 18th of August 2010 08:28:04 PM
Old 08-18-2010
Code:
awk '{gsub(/></,">\n<")}1' 2site.xml|awk -F ">|<" '
/<TCRMService>/{printf "\n"}
/requestID/||/ResultCode/||/SitePartyId/||/AddressUsageType/||/TransportZoneType/ {printf $3","}
END{printf "\n"}'|cut -d, -f2-

This User Gave Thanks to rdcwayx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to retrieve the particular value from a same list of xml tags

Hi All, I have the following code in one of my xml file: <com:parameter> <com:name>secretKey</com:name> <com:value>31XA874821172E89B00B1C</com:value> </com:parameter> <com:parameter> <com:name>tryDisinfect</com:name> <com:value>false</com:value> </com:parameter> <com:parameter>... (4 Replies)
Discussion started by: mjavalkar
4 Replies

2. Shell Programming and Scripting

how to retrieve specific parameters using a xml tag

Hi, I have the following code in my xml file: <aaaRule loginIdPattern=".*" orgIdPattern=".*" deny="false" /> <aaaRuleGroup name="dpaas"> <aaaRule loginIdPattern=".*" orgIdPattern=".*" deny="false" /> I want to retrieve orgIdPattern and loginIdPattern parameter value based on... (2 Replies)
Discussion started by: mjavalkar
2 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

Shell Command to compare two xml lines while ignoring xml tags

I've got two different files and want to compare them. File 1 : HTML Code: <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies

6. Shell Programming and Scripting

Compare two xml files while ignoring some xml tags

I've got two different files and want to compare them. File 1 : <response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record id="38,557"><columns><column><name>orge... (2 Replies)
Discussion started by: Shaishav Shah
2 Replies

7. Shell Programming and Scripting

How to add Xml tags to an existing xml using shell or awk?

Hi , I have a below xml: <ns:Body> <ns:result> <Date Month="June" Day="Monday:/> </ns:result> </ns:Body> i have a lookup abc.txtt text file with below details Month June July August Day Monday Tuesday Wednesday I need a output xml with below tags <ns:Body> <ns:result>... (2 Replies)
Discussion started by: Nevergivup
2 Replies

8. Red Hat

Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia.

Most of my commands are returning this error on RHEL 6 64 bit: Also I tried installing many sofwtares, but it fails to correctly work. For example I treid installing dos2unix: # rpm -ivh dos2unix-5.3.3-5.ram0.98.src.rpm 1:dos2unix warning: user mockbuild does not... (0 Replies)
Discussion started by: India_2014
0 Replies

9. Shell Programming and Scripting

How to retrieve values from XML file and update them in the same position! PLEASE HELP?

Good Day All Im quiet new to ksh scripting and need a bit of your help. I am attempting to write a script that reads in an XML and extracts certain field values from an XML file. The values are all alphanumeric and consist of two components: e.g "Test 1". I need to to create a script that... (2 Replies)
Discussion started by: JulioAmerica
2 Replies

10. UNIX for Beginners Questions & Answers

How to pull multiple XML tags from the same XML file in Shell.?

I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies
Image::ExifTool::TagInfoXML(3)				User Contributed Perl Documentation			    Image::ExifTool::TagInfoXML(3)

NAME
Image::ExifTool::TagInfoXML - Read/write tag information XML database DESCRIPTION
This module is used to generate an XML database from all ExifTool tag information. This database may then be edited and used to re-generate the localized tag information modules (Image::ExifTool::Lang::*). METHODS
Write Print complete tag information database in XML format. # save list of all tags $success = Image::ExifTool::TagInfoXML::Write('dst.xml'); # list all IPTC tags to console, including Flags Image::ExifTool::TagInfoXML::Write(undef, 'IPTC', Flags => 1); # write all EXIF Camera tags to file Image::ExifTool::TagInfoXML::Write($outfile, 'exif:camera'); Inputs: 0) [optional] Output file name, or undef for console output. 1) [optional] String of group names separated by colons to specify the group to print. A specific IFD may not be given as a group, since EXIF tags may be written to any IFD. Saves all groups if not specified. 2) [optional] Hash of options values: Flags - Set to output 'flags' attribute NoDesc - Set to suppress output of descriptions Return Value: True on success. Sample XMP Output: <?xml version='1.0' encoding='UTF-8'?> <taginfo> <table name='XMP::dc' g0='XMP' g1='XMP-dc' g2='Other'> <desc lang='en'>XMP Dublin Core</desc> <tag id='title' name='Title' type='lang-alt' writable='true' g2='Image'> <desc lang='en'>Title</desc> <desc lang='de'>Titel</desc> <desc lang='fr'>Titre</desc> </tag> ... </table> </taginfo> Flags (if selected and available) are formatted as a comma-separated list of the following possible values: Avoid, Binary, List, Mandatory, Permanent, Protected, Unknown and Unsafe. See the tag name documentation and lib/Image/ExifTool/README for a description of these flags. For XMP List tags, the list type (Alt, Bag or Seq) is also output as a flag if applicable. BuildLangModules Build all Image::ExifTool::Lang modules from an XML database file. Image::ExifTool::TagInfoXML::BuildLangModules('src.xml'); Inputs: 0) XML file name Return Value: Number of modules updated, or negative on error. AUTHOR
Copyright 2003-2010, Phil Harvey (phil at owl.phy.queensu.ca) This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Image::ExifTool(3pm), Image::ExifTool::TagNames(3pm) perl v5.12.1 2010-03-01 Image::ExifTool::TagInfoXML(3)
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy