Welcome to WebmasterWorld Guest from 54.147.0.174

Forum Moderators: httpwebwitch

Message Too Old, No Replies

XML won't validate.

White spaces are required between publicId and systemId.

     

StoutFiles

2:08 am on Jul 9, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



For starters I apologize at my small XML knowledge, I'm just not sure why this XML file won't work. Here's my error message.

Malformed XML in file http://www.example.com/test/filetest.xml: White spaces are required between publicId and systemId. At: (1,50)

I'm not sure what that error means or what those coordinates mean for finding the error. Here's my XML file.

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="-removed-"
description="-removed-"
author="-removed-"
author_email="-removed-"
screenshot="-removed-"
thumbnail="-removed-"
author_location="-removed-"
author_affiliation="-removed-"
title_url="-removed-"
author_photo="-removed-"
author_aboutme="-removed-"
author_link="-removed-"
scrolling="true">
<Require feature="opensocial-0.7" />
<Locale lang="ALL" />
</ModulePrefs>
<Content type="html">
<![CDATA[

<form name="vote" action="http://www.example.com/test/test.php" method="post"><input type="hidden" name="tester" value="1136">
<a href="javascript:document.vote.submit();">Loading...</a>
</form>

<script language="JavaScript">
document.vote.submit();
</script>

]]>
</Content>
</Module>

-removed- means a link or info was there. This is driving me crazy at this code used to validate properly and now it doesn't.

[edited by: StoutFiles at 2:08 am (utc) on July 9, 2008]

httpwebwitch

1:31 pm on Jul 9, 2008 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



you usually see that error when you omit the whitespace between parts of a DOCTYPE declaration. I've never seen that one emerge from XML validation.

But I'd be willing to wager there's a bit of whitespace missing that needs to be there, perhaps between your attributes?

I use a text editor where hidden+whitespace characters (like space, tab, and newline) are indicated in a faint grey color. They don't interfere with visual appreciation of the text, but you can tell they're there. If your editor has an option to show hidden characters, it can help you to find these kinds of whitespace problems.

FYI, rogue whitespace in XSLT can be exceptionally hazardous

StoutFiles

2:50 am on Jul 10, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Thanks for your feedback, I'll keep messing around with it. I have this urge to always build with Notepad...I'll move to a better editor.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month