Sponsored Content
Top Forums Shell Programming and Scripting How to create a xml file using Perl Script Post 302421015 by girish.raos on Thursday 13th of May 2010 07:35:08 AM
Old 05-13-2010
Hi,
the input and ouput file are as follows.
Input data file shall contan plan_name,service name,deal_name, bal_info_index,subscription_index.

Output Xml file:
Code:
<plan ondemand_billing="no">
<plan_name>DE_PR_Package__Basic+1Premium_Film__Monthly</plan_name>
<service_deal>
<service_name>/service/blue_movie</service_name>
<bal_info_index>0</bal_info_index>
<subscription_index>0</subscription_index>
</service_deal>
<service_deal>
<service_name>/service/ppv</service_name>
<deal_name>DE_PR_PPV</deal_name>
<bal_info_index>0</bal_info_index>
<subscription_index>0</subscription_index>
</service_deal>
<service_deal>
<service_name>/service/broadband</service_name>
<deal_name>DE_PR_Package__Basic+1Premium_Film__Monthly</deal_name>
<bal_info_index>0</bal_info_index>
<subscription_index>0</subscription_index>
</service_deal>
</plan>

Thanks,
Giri

Last edited by Scott; 05-13-2010 at 10:26 AM.. Reason: Code tags, please...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to extract 'ID' From XML File

File1.xml <?xml version.........> - <abcd:abcd_list version="1" www.john_uncle's_server.com" xmlns: - <device id="100"> <firmware>12.4(3d)</firmware> <location id="500">Sitting Room</location> </device> - <device id="101"> <firmware>12.4(3d)</firmware> <location id="501">Class... (1 Reply)
Discussion started by: sureshcisco
1 Replies

2. Shell Programming and Scripting

perl script to update a xml file

Hi experts, I have a set of xml files in folder which has the below field. <mm:sessionID>157.235.206.12900397BE4:A</mm:sessionID>, I need to update this field regularly with new session id, which I have it from a login file. Can anyone tell me how to add a new value in <mm:sessionID>... (3 Replies)
Discussion started by: amvarma77
3 Replies

3. Shell Programming and Scripting

Create an XML tree using perl

Hi, I am having an xml file which looks like this: <Nodes> <Node> <Nodename>Student</Nodename> <Filename>1.txt</filename> <Node> <Nodename>Dummy</Nodename> <Filename>22.txt</filename> </Node> </Node> </Nodes> The text files will have data like this: #1.txt... (8 Replies)
Discussion started by: vanitham
8 Replies

4. Programming

extract xml data and create word document using perl.

hi, i have large xml file which contains students information, i need to extract student number and some address tags and create a word document for the extracted data. my data looking llike this <student> <number>24</number> <education>bachelors</education> ... (1 Reply)
Discussion started by: veerubiji
1 Replies

5. Programming

Extract xml data and create word document using perl.

Hi, I have large xml data file.I need to extract node and some tags in the node and after I need to create word document. my XMl data is look like as below -<student> <number>24</number> <education>bachelor</bachelor> <specialization>computers</specialization> ... (3 Replies)
Discussion started by: veerubiji
3 Replies

6. Programming

help need in the perl script that create one xml file form multiple files.

Hi every one, Please excuse me if any grammatical mistakes is there. I have multiple xml files in one directory, I need to create multiple XML files into one XML file.example files like this</p> file1:bvr.xml ... (0 Replies)
Discussion started by: veerubiji
0 Replies

7. Shell Programming and Scripting

Get multiple values from an xml file using one of the following commands or together awk/perl/script

Hello, I have a requirement to extract the value from multiple xml node and print out the values to new file to compare. Would be done using either awk/perl or some unix script. For example sample input file: ..... ..... <factories xmi:type="resources.jdbc:DataSource"... (2 Replies)
Discussion started by: slbmind
2 Replies

8. Shell Programming and Scripting

Splitting xml file into several xml files using perl

Hi Everyone, I'm new here and I was checking this old post: /shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html (cannot paste link because of lack of points) I need to do something like this but understand very little of perl. I also check... (4 Replies)
Discussion started by: mcosta
4 Replies

9. Shell Programming and Scripting

UNIX/PERL script to convert XML file to pipe delimited format

Hello, I need to get few values from a XML file and output needs to be written in another file with pipe delimited format. The Header & Footer of the Pipe Delimited file will be constant. The below is my sample XML file. I need to pull the values in between the XML tags <Operator_info to... (15 Replies)
Discussion started by: karthi1305561
15 Replies

10. Shell Programming and Scripting

Need to read a csv and create xml - Perl

I have a csv file like below. john,r2,testdomain1,john.r2@hex.com,DOMAINADMIN,testdomain1.dom maxwell,b2, testdomain1,maxwell.b2@hex.com,DOMAINADMIN,testdomain1.dom I would need the perl script to read the above csv and create an xml like below. <Users> ... (1 Reply)
Discussion started by: Tuxidow
1 Replies
GUPNP_DEVICE_INFO_GET_SERVICE(3)					 1					  GUPNP_DEVICE_INFO_GET_SERVICE(3)

gupnp_device_info_get_service - Get the service with type

SYNOPSIS
resource gupnp_device_info_get_service (resource $root_device, string $type) DESCRIPTION
Get the service with type or false if no such device was found. PARAMETERS
o $root_device - A root device identifier, returned by gupnp_root_device_new(3). o $type - The type of the service to be retrieved. RETURN VALUES
A service identifier. EXAMPLES
Example #1 Create new UPnP context and get device info service <?php /* Create the UPnP context */ $context = gupnp_context_new(); if (!$context) { die("Error creating the GUPnP context "); } /* Create root device */ $location = "/BinaryLight1.xml"; $dev = gupnp_root_device_new($context, $location); /* Set root device is available */ gupnp_root_device_set_available($dev, true); /* Get the switch service from the root device */ $service_type = "urn:schemas-upnp-org:service:SwitchPower:1"; $service = gupnp_device_info_get_service($dev, $service_type); if (!$service) { die("Cannot get SwitchPower1 service "); } ?> PHP Documentation Group GUPNP_DEVICE_INFO_GET_SERVICE(3)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy