CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
copy part of xml to other xml


New User

Nov 9, 2012, 4:58 AM

Post #1 of 2 (17874 views)
copy part of xml to other xml Can't Post

I have 2 xml files say one.xml and two.xml.

1.I need to update 5 tags in one.xml and copy 5 more tags from two.xml to one.xml.
2. Now, i need to update 5 tags in two.xml and copy 5 more tags from one.xml to two.xml.

I am using simple:XML in updating the tags and it is working fine.

Now, i have 2 problems.

1. The updated xml need to be written to the original one.xml by taking a backup of it.
2. copying the part of xml from two to one is not working.

Can anyone throw some help here.


(This post was edited by deepthi28 on Nov 9, 2012, 4:59 AM)

Veteran / Moderator

Nov 9, 2012, 2:08 PM

Post #2 of 2 (17868 views)
Re: [deepthi28] copy part of xml to other xml [In reply to] Can't Post

Hmm, I am not sure I understand everything.

Generally speaking (there are a few exceptions), you can't edit an existing file, you need to create a modified copy of it, and then replace the original file with the modified copy. (As for the exceptions, usually they still do a modified copy of the original file and do the necessary housecleaning behind the scenes.)

For problem 2, you will have to provide your code, there is no way we can help you with so little information.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives