954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

XML formatting.

I can't find anything wrong with this document. I am using the xom libraries to parse this doc and they keep giving me an error.
If someone could point out my errors that would be great.

<?xml version = "1.0" encoding = "UTF-8"?>
<update version = "0" date = "3.21.11" time = "1815" systemRestart = "false" programRestart = "false" programOffDuringUpdate = "false"/>
<folder name = "Game Center" hidden = "false" url = "http://kenai.com/projects/resource/downloads/download/GCResourceFiles/">
	<folder name = "Games" hidden = "false" url = "null">
		<folder name = "Panterra" hidden = "false" url = "null">
			<folder name = "data" hidden = "false" url = "null">
				<file url = "http://kenai.com/projects/resource/downloads/directory/GCResourceFiles/FileList.xml" name = "FileList" type = ".xml" size = "null" udatedInVersion = "" />
				<file url = "http://kenai.com/projects/resource/downloads/directory/GCResourceFiles/Castle.blend" name = "castle" type = ".blend" size = "null" udatedInVersion = "" />
			</folder>
		</folder>
	</folder>
</folder>


Thanks.

DarkLightning7
Junior Poster in Training
71 posts since Jan 2011
Reputation Points: 15
Solved Threads: 7
 

all well formed xml documents need a root node. You have two elements at the top level, you can only have one

JohnBampton
Newbie Poster
15 posts since Feb 2011
Reputation Points: 10
Solved Threads: 6
 

Thanks I think that did it but I won't know until I am able to parse the entire document with the java xom libraries.

DarkLightning7
Junior Poster in Training
71 posts since Jan 2011
Reputation Points: 15
Solved Threads: 7
 

make your xml valid

<?xml version = "1.0" encoding = "UTF-8"?>
<update version = "0" date = "3.21.11" time = "1815" systemRestart = "false" programRestart = "false" programOffDuringUpdate = "false">
<folder name = "Game Center" hidden = "false" url = "http://kenai.com/projects/resource/downloads/download/GCResourceFiles/">
	<folder name = "Games" hidden = "false" url = "null">
		<folder name = "Panterra" hidden = "false" url = "null">
			<folder name = "data" hidden = "false" url = "null">
				<file url = "http://kenai.com/projects/resource/downloads/directory/GCResourceFiles/FileList.xml" name = "FileList" type = ".xml" size = "null" udatedInVersion = "" />
				<file url = "http://kenai.com/projects/resource/downloads/directory/GCResourceFiles/Castle.blend" name = "castle" type = ".blend" size = "null" udatedInVersion = "" />
			</folder>
		</folder>
	</folder>
</folder>
</update>
xml_looser
Junior Poster
179 posts since Apr 2009
Reputation Points: 16
Solved Threads: 21
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You