473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

USING PERL To APPEND Data to a XML file

2
Hi
I am new to Perl, could you please help in how to open a XML file and append data to it.

XML File:

<?xml version="1.0" encoding="ASCII"?>
<componentmanifest.application:ApplicationConfigur ation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:componentmanifest.application="http:///componentmanifest/application.ecore" xmlns:componentmanifest.description="http:///componentmanifest/description.ecore" xmi:id="ApplicationConfiguration">
<description xmi:id="MediaRootProcessAppConfig.hbac_Description ">
<delegationPoints xsi:type="componentmanifest.description:PortDescri ption" xmi:id="Using_api/sys/data/pf/engineering/src/DSYSEngineeringApp_3.0.0_Engineering" name="Engineering" incomingConnectors="_i0teQLTvEd-_huZVa1DFhQ">
<interface href="mocca:imp/nbt/mm/mmdebuginfo/src/PMMDebugInfoDevImplManifest.hbcm#api/sys/data/pf/engineering/src/DSYSEngineeringApp_3.0.0"/>
</delegationPoints>
<parameterProviders xsi:type="componentmanifest.description:ExternalPa rameterInitialization" xmi:id="_9oV2cM89Ed6JTfPP1OWyvQ">
<requiredParameter href="mocca:appconfigs/qnxintel/subsystems/NBTCommcoSubsystem.hbsc#ParameterReference_MmeGlob alBaseDevCtrl_Config"/>
</parameterProviders>
<connectors xsi:type="componentmanifest.description:AssemblyCo nnector" xmi:id="_TUlewGyiEd-vxOnUAC_0Ig">
<source href="mocca:appconfigs/qnxintel/subsystems/NBTPresCtrlSubSystem.hbsc#PortReference_Multimedia PlayerFront_Using_api/mm/media/pf/src/DMMPlayerNav_6.0.0_PlayEngineZone1"/>
<target href="mocca:appconfigs/qnxintel/subsystems/NBTCommcoSubsystem.hbsc#PortReference_PlayEngineZo ne1_Providing_api/mm/media/pf/src/DMMPlayerNav_6.1.0"/>
</connectors>
</description>
<deployments xsi:type="componentmanifest.application:Applicatio nDeployment" xmi:id="_LPnLMM5_Ed6Bfp5E6XnJKw" name="Default">
<processes xmi:id="_Pn-6AM7JEd6IY6dYC1rnCA" name="NBTMediaMainApp" comment="">
<dsiThreads xmi:id="_VRqzAM9QEd6g88g4Gh8Y2w">
<send xmi:id="_VRqzAc9QEd6g88g4Gh8Y2w" watchdogTimeout="60000"/>
<receive xmi:id="_VRqzAs9QEd6g88g4Gh8Y2w" watchdogTimeout="60000"/>
</dsiThreads>
<subSystems href="mocca:appconfigs/qnxintel/subsystems/NBTPresCtrlSubSystem.hbsc#SubSystemDeployment"/>
<subSystems href="mocca:appconfigs/qnxintel/subsystems/NBTCommcoSubsystem.hbsc#SubSystemDeployment"/>
<subSystems href="mocca:appconfigs/qnxintel/subsystems/NBTMediaOnOffSubsystem.hbsc#SubSystemDeployment"/>
</processes>
<frameworkConfig xmi:id="_LBonAEVwEeCktOQek5zViA" watchdogWarningLimit="75" frameworkThreadPartitionName="interaction">
<tracePersistence xmi:id="_RXZPMEVwEeCktOQek5zViA" headerFile="api/sys/tracesrv/pf/trace/src/CHBDefaultBinaryTracePersistence.hpp" className="CHBDefaultBinaryTracePersistence"/>
<defaultThreadParameters xmi:id="_b8gMsEVwEeCktOQek5zViA" watchdogTimeout="100" stackSize="32768">
<priorities xmi:id="_fZ784EVwEeCktOQek5zViA" priorityValue="10" isAbsolute="true"/>
<priorities xmi:id="_g0PXsEVwEeCktOQek5zViA" isAbsolute="true" osFamily="WIN32"/>
</defaultThreadParameters>
</frameworkConfig>
<rootComponent href="mocca:appconfigs/qnxintel/subsystems/NBTMediaOnOffSubsystem.hbsc#DeployedComponent_Mult imediaOnOffComponent"/>
</deployments>
</componentmanifest.application:ApplicationConfigura tion>



DATA TO BE ADDED at their respective tags:

<delegationPoints xsi:type="componentmanifest.description:PortDescri ption" xmi:id="Providing_api/nbt/mm/common/src/MmeCommon_3.2.0_MmeCommon" name="MmeCommon" incomingConnectors="_UUFLQJmmEeGK0NAOkJ-nZw" provider="true">
<interface href="mocca:imp/nbt/mm/mmecommon/src/MmeCommonManifest.hbcm#api/nbt/mm/common/src/MmeCommon_3.2.0"/>
</delegationPoints>

<connectors xsi:type="componentmanifest.description:Delegation Connector" xmi:id="_UUFLQJmmEeGK0NAOkJ-nZw" target="Providing_api/nbt/mm/common/src/MmeCommon_3.2.0_MmeCommon">
<source href="mocca:appconfigs/qnxintel/subsystems/NBTPresCtrlSubSystem.hbsc#PortReference_MmeCommon_ Providing_api/nbt/mm/common/src/MmeCommon_3.2.0"/>
</connectors>
May 22 '12 #1
0 1723

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sam | last post by:
I would like to store html templates in a database. By using perl I would like to retrive the template ask the user to fill the template and store the whole file is template + the user data in a...
3
by: Jonathan Buckland | last post by:
Can someone give me an example how to append data without having to load the complete XML file. Is this possible? Jonathan
14
by: vbMark | last post by:
Greetings, This seems like it should be simple but I can't figure out how to do this. I just want to append binary file 2 on to the end of binary file 1. Sample code please? Thanks!
2
by: kelly | last post by:
Hi, I don't have a code to show you, what I need are references or algorithms so that I'm in a right track. By the way, thanks for introducing me the array or arrays. Now I can continue my...
3
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called...
3
by: premMS143 | last post by:
How to append Data to an existing Excel file? means, I'm using VB as front end & once I exported the data to Excel file & saved it as 'ABC.xls'. Now, the question/doubt is; I addded some more...
3
by: Sidra Nisar | last post by:
Hello……I am working on voice transmission control through linux as my project in high school……I need to know if the comments I have made on the following program are correct…. Object of the perl...
15
numberwhun
by: numberwhun | last post by:
Ok, let me preface this thread by saying that I cannot provide a real sample of the data that I am working with. The reason is, because it contains a lot of private, confidential information (for...
6
by: Dave067 | last post by:
Hi This is my first attempt at writing Python script - it's probably a bit ambitious, but there again, whatever doesn't kill you makes you stronger... ;-) I'm trying to write a script for a...
13
by: Elizabeth H | last post by:
Hi, I had a few questions regarding searching for a string and replacing it using perl scripts. I have 100's of files written in Unix shell scripts and I need to edit them all. Its like ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.