Sponsored Content
Top Forums Shell Programming and Scripting Need to replace particular content in a xml file Post 302593815 by cnraja on Sunday 29th of January 2012 12:54:56 AM
Old 01-29-2012
Need to replace particular content in a xml file

Hi,
My requirement is to find a text and replace it with another in a XML file.
I am new to Unix,Please provide some suggestion to achieve.

Find:
Code:
<Style ss:ID="ColumnHeader1">

Replace with:
Code:
 <Style ss:ID="ColumnHeader1">
  <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous"ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
  </Borders>

Thanks In Advance

Last edited by Franklin52; 01-29-2012 at 09:16 AM.. Reason: Please use code tags for data and code samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

appending content in a xml file

Please help me on this..... i have a file which has following content: <IPCoreProducerConfig> <Producer> <config> <key>machineId</key> <value>machine1</value> </config> <config> ... (4 Replies)
Discussion started by: Aditya.Gurgaon
4 Replies

2. Shell Programming and Scripting

How to replace some content of a file and write with a new name

Hi I have a control file which looks like this LOAD DATA INFILE '/home/scott/XXX.dat' PRESERVE BLANKS ............. ............. how can i change the content of this file and replace the file in the second line with anothe file name and write it back with another name to the disk? ... (5 Replies)
Discussion started by: mwrg
5 Replies

3. Shell Programming and Scripting

Replace file content after checking value

Our system is receiving one feed from the third party. One of the field in the flat file is ID which id from position 19 to 27. In some cases this ID is coming as 9 zeros (000000000) or 1 right padded zero. ( 0) For these specific records I want to replace fthis field with blank... (3 Replies)
Discussion started by: varunrbs
3 Replies

4. Shell Programming and Scripting

Extract XML content from a file

310439 2012-01-11 03:44:42,291 INFO PutServlet:? - Content of the Message is:="1.0" encoding="UTF-8"?><ESP_SSIA_ACC_FEED> 310440 <BATCH_ID>12345678519</BATCH_ID> 310441 <UID>3498748823</UID> 310442 <FEED_TYPE>FULL</FEED_TYPE> 310443 <MART_NAME>SSIA_DM_TRANSACTIONS</MART_NAME> 310444... (11 Replies)
Discussion started by: arukuku
11 Replies

5. Shell Programming and Scripting

Create xml file using a content from another xml file

I need to create a xml file(master.xml) with contents from another xml files(children). I have below list of xml files in a temporary location (C:/temp/xmls) 1. child1.xml 2. child2.xml Below is the content of the child1.xml & child2.xml files, child1.xml <root> <emp> ... (3 Replies)
Discussion started by: vel4ever
3 Replies

6. Shell Programming and Scripting

Sed: replace content from file with the content from file

Hi, I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C. Thanks a lot!! Here is a sample of my question. e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies

7. Shell Programming and Scripting

Extracting content from xml file

Hello All, Hope you are doing well!!!!! I have a small code in the below format in xml file: <UML:ModelElement.taggedValue> <UML:TaggedValue tag="documentation" value="This sequence&#xA;&#xA;HLD_EA_0001X&#xA;HLD_DOORS_002X"/> <UML:TaggedValue tag="documentation" value="This... (11 Replies)
Discussion started by: suvendu4urs
11 Replies

8. UNIX for Dummies Questions & Answers

Grep content in xml file

I have an xml file with header as below. <Provider xmlns="http://www.xyzx.gov/xyz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xyzx.gov/xyz xyz.xsd" SCHEMA_VERSION="2.5" PROVIDER="5"> I want to get the schema version here that is 2.5 and put in a... (7 Replies)
Discussion started by: Ariean
7 Replies

9. Shell Programming and Scripting

Replace file name with Space as content

Hi, I am having a files in my directory like this: 2014 1049_file1.txt 2014 1050_file2.txt 2014 1110_file3.txt 2014 1145_file4.txt 2014 2049_file5.txt I need to replace the above file names like this without changing the content of filename: file1.txt file2.txt file3.txt... (10 Replies)
Discussion started by: rohit_shinez
10 Replies

10. Shell Programming and Scripting

Replace content from a file and save

Hi, Right now there is a file called 'qm.ini' which is owned by mqm:mqm and I am trying to replace a line from this file with something else and save. I am using the below perl command to replace and save within a shell script with a different user called 'mqadm' which is also part of mqm... (1 Reply)
Discussion started by: bdpl
1 Replies
Feed::Find(3pm) 					User Contributed Perl Documentation					   Feed::Find(3pm)

NAME
Feed::Find - Syndication feed auto-discovery SYNOPSIS
use Feed::Find; my @feeds = Feed::Find->find('http://example.com/'); DESCRIPTION
Feed::Find implements feed auto-discovery for finding syndication feeds, given a URI. It (currently) passes all of the auto-discovery tests at http://diveintomark.org/tests/client/autodiscovery/. Feed::Find will discover the following feed formats: o RSS 0.91 o RSS 1.0 o RSS 2.0 o Atom USAGE
Feed::Find->find($uri) Given a URI $uri, use a variety of techniques to find the feeds associated with that page. If $uri itself points to a feed (i.e., if the Content-Type of the response is a recognized feed type), returns $uri. Returns a list of feed URIs. The following techniques are used: 1. <link> tag auto-discovery If the page contains any <link> tags in the <head> section, these tags are examined for recognized feed content types. The following content types are treated as feeds: application/x.atom+xml, application/atom+xml, application/xml, text/xml, application/rss+xml, and application/rdf+xml. 2. Scanning <a> tags If the page does not contain any known <link> tags, the page is then scanned for <a> tags for links to URIs with certain file extensions. The following extensions are treated as feeds: .rss, .xml, and .rdf. Note that this technique is employed only if the first technique returns no results. Feed::Find->find_in_html($html [, $base_uri ]) Given a reference to a string $html containing an HTML page, uses the same techniques as described above in find to find the feeds associated with that page. If you know the URI of the page, you should provide it in $base_uri, so that relative links can be properly made absolute. Feed::Find will attempt to determine the correct base URI, but unless that URI is specified in the HTML itself (in a "<meta>" tag), you'll need to supply it yourself. Returns a list of feed URIs. LICENSE
Feed::Find is free software; you may redistribute it and/or modify it under the same terms as Perl itself. AUTHOR &; COPYRIGHT Except where otherwise noted, Feed::Find is Copyright 2004 Benjamin Trott, ben+cpan@stupidfool.org. All rights reserved. perl v5.10.1 2011-01-28 Feed::Find(3pm)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy