Sponsored Content
Top Forums Shell Programming and Scripting appending content in a xml file Post 302288749 by Aditya.Gurgaon on Wednesday 18th of February 2009 01:07:46 AM
Old 02-18-2009
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>
<key>Producer Type</key>
<value>Breakout</value>
</config>
<config>
<key>Protocol</key>
<value>SIP</value>
</config>
</Producer>
</IPCoreProducerConfig>

i want to append same thing again so that the content of file looks like:
<IPCoreProducerConfig>
<Producer>
<config>
<key>machineId</key>
<value>machine1</value>
</config>
<config>
<key>Producer Type</key>
<value>Breakout</value>
</config>
<config>
<key>Protocol</key>
<value>SIP</value>
</config>
</Producer>
<Producer>
<config>
<key>machineId</key>
<value>machine1</value>
</config>
<config>
<key>Producer Type</key>
<value>Breakout</value>
</config>
<config>
<key>Protocol</key>
<value>SIP</value>
</config>
</Producer>
</IPCoreProducerConfig>

Last edited by Aditya.Gurgaon; 02-18-2009 at 02:13 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending string to xml file using "sed"

Hi folks, Following a section in opmn.xml file: </process-type> <process-type id="OC4J_RiGHTv_IRD1" module-id="OC4J"> <environment> <variable id="LD_LIBRARY_PATH" value="/home/ias/v10.1.2/lib" append="true"/> <variable id="SHLIB_PATH"... (2 Replies)
Discussion started by: nir_s
2 Replies

2. Shell Programming and Scripting

Appending file content

how to append the contents of filel to the contents of file2?. i.e. file1: 1 2 3 file2: 4 5 6 then the file2 shoud be 4 5 6 1 2 (7 Replies)
Discussion started by: shashwat2691
7 Replies

3. 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

4. Shell Programming and Scripting

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: <Style ss:ID="ColumnHeader1"> Replace with: <Style ss:ID="ColumnHeader1"> <Borders> <Border ss:Position="Bottom"... (4 Replies)
Discussion started by: cnraja
4 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

Help required in Splitting a xml file into multiple and appending it in another .xml file

HI All, I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz. eg: <?xml version="1.0"?>... (4 Replies)
Discussion started by: ganesan kulasek
4 Replies

7. HP-UX

XML tag name content replacement

Hi, Need to replace an XML tag name contents, please provide any suggestions. Scenario is : <abc_def>Value_some_content</abc_def> Expected output : <abc:def>Value_some_content</abc:def> We have many tag with different names & contents in a file or a string. Please help on the... (3 Replies)
Discussion started by: periyasamycse
3 Replies

8. 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

9. 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

10. Shell Programming and Scripting

Appending content of a file to another file before a specific character

Hi there, i've got a file with this content $ cat file1 Matt Mar The other file has the same number of lines with this content: $ cat file2 20404=767294 23450=32427 is there a way with either using sed, awk or paste to insert the content of file1 before the "=" character? So... (3 Replies)
Discussion started by: nms
3 Replies
sip_get_header_value(3SIP)			   Session Initiation Protocol Library Functions			sip_get_header_value(3SIP)

NAME
sip_get_header_value, sip_get_next_value - get a SIP header value SYNOPSIS
cc [ flag ... ] file ... -lsip [ library ... ] #include <sip.h> const struct sip_value *sip_get_header_value (const struct sip_header *sip_header, int *error); const struct sip_value *sip_get_next_value (sip_header_value_t old_value, int *error); DESCRIPTION
The sip_get_header_value() function returns the first valid value from SIP header sip_header. The sip_get_next_value() function returns the next valid value following the SIP value old_value. RETURN VALUES
These functions return the queried value on success and NULL on failure. The value of errno is not changed by these calls in the event of an error. ERRORS
If the error is non-null, one of the following values is set: EINVAL If any of the required input is NULL or if the specified SIP header value is marked deleted. EPROTO If the returned SIP header value is invalid (i.e. the parser encountered errors when parsing the value). On success, the value of the location pointed to by error is set to 0. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libsip(3LIB) SunOS 5.11 25 Jan 2007 sip_get_header_value(3SIP)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy