473,386 Members | 1,710 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,386 software developers and data experts.

To append an XML stream as a chile in another XML stream

Hi ,

Can anyone tell me how to add/append an XML stream as a child in existing XML stream ?


Thanks in advance
Santosh
May 20 '08 #1
3 2015
jkmyoung
2,057 Expert 2GB
??
Are you looking for something like an include statement, or simply adding text from one file to the next?

What type of code are you using?
May 20 '08 #2
Well, I have big XML file. Now I have another standalone XML file. I want to plug the standalone XML file as node into the Big one.

Please let me know if it does not make sense to you.
May 21 '08 #3
jkmyoung
2,057 Expert 2GB
Sounds like it would be best done by a scripting language.
Is the 2nd file to be appended near the end of the first file?

Sounds like:
1. Remove the last closing tag from the first file.
2. Add all of the second file.
3. Add the last closing tag.

If you need to add it somewhere in the middle, it'd be something like:
1. Copy the file until you reach the specified tag.
2. Call a function which adds all of the second file.
3. Copy the rest of the file.

Eg, particular unix commands might be:

sed '$s/ *\([^ ]* *\)$//' data1.file >> output.file
cat data2.file >> output.file
cata endtag.file >> output.file.

Where endtag.file just contains the endtags, and your filenames are data1.file and data2.file.

http://www.computing.net/answers/uni...file/7535.html
http://cds.dl.ac.uk/cds/manuals/unix_guide/node39.html
May 21 '08 #4

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

Similar topics

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
1
by: David Barger | last post by:
Greetings, It appears that an Append Query I run in Access XP is randomly failing to append a field. I have payroll data being entered into a payroll database. This data is exported daily to...
14
by: Aaron Couts | last post by:
I have a program that writes to a log file. It's compiled on RH Linux 7.3 (Kernel 2.4.18-18.7). It's using fopen in append mode. When the file reaches 51200000 bytes in size, the program will no...
5
by: rip_tide | last post by:
I am trying to find out if C# has the ability to tie into windows so that when a user tries to save a file from any windows application a save as dialog box opens that is written in c# with other...
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!
1
by: piotrek | last post by:
Hi. I would like to ask if there is a method to force streamwriter.writeline() to write line at the end of existing file, or should i have write the method for my own. PK
5
by: Eric | last post by:
Is there a class that will allow me to append a byte to another? The data that I have is binary so StringBuilder will not work.
5
by: Simone M | last post by:
Here is my problem: I need to append a string to a file every time the user downloads this file. The string is different for every user. I would like to append the string to the file via ftp. But...
2
by: Kevien Lee | last post by:
Hi , I had a strang problam ,when i use StreamWriter to append to a file,i found that if i don't close the StreamReader it couldn't write the data into file,the code as folllow that: class...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.