Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging XML Help Please

Status
Not open for further replies.

sam666

Technical User
Feb 14, 2006
2
GB
Hey,
I’m using an open source mmoprg game server but it uses xml for the database I will stick with XML for a while till I move on to MYSQL. But I am not experienced with XML and I am having trouble merging. I tried XMLSpy but on the second file it says not well formed and gave me errors there’s like 5-6k lines so I have no idea or what to do to fix this. It looks like it’s more indented then the other one so when I copy it on it doesn't line up.

This is the first XML File (Main one) there are like 60k lines.


This is the second XML File I want to add this to the first one.


Anyone help me please?

Regards
Sam
 
I try (not very hard) to go get the files for inspection. I decide not to get them after all, clicks after clicks for download. (You've to convince the forum we can trust it. Is the site yours?)

So either you show abrigded versions for the forum to inspect, or, I can show you generally how, supposing homogenous structure without filtering or inserting etc. This is the vbs way of doing thing.
[tt]
set oparser1=createobject("msxml2.domdocument")
set oparser2=createobject("msxml2.domdocument")
oparser1.load [green]"d:\test\itemtemplate.xml"[/green]
oparser2.load [green]"d:\test\epicarmor.xml"[/green]
for each onode in oparser2.documentElement.childNodes
oparser1.documentElement.appendChild onode
next
oparser1.save [green]"d:\test\merged_itemtemplate.xml"[/green]
set oparser2=nothing
set oparser1=nothing
[/tt]
Filenames and paths are for you to adopt to your situation.
 
I don't understand that, the site is a free upload / download site its very trust worthy, just click free and dl I had no where else to host.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top