Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If I validate the file it says to me missing white space

<?xml version="1.0"?>
<?xml-stylesheet href="Q2XSLT.xsl" type="text/xsl" ?>
<!-- referencing the XSD file -->
<sweetShop xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="Q2SCHEMA.xsd">
    <shopName>Bracken Candy Holders</shopName>
	<slogan>Worlds best candy stockholder and candy store</slogan>
    
	<product id = "one" >
		<name>Smarties</name>
        <desc>Hard coated candy with a chocolate center</desc>
        <price>6.75</price>
		<quantity>5000</quantity>
		<stockholders>Shoprite</stockholders>		
    </product>

	<product id = "two" >
        <name>Jellytots</name>
        <desc>Soft jelly coated in sugar</desc>
        <price>15.95</price>
		<quantity>6000</quantity>
		<stockholders>Pick n Pay</stockholders>
    </product>

	<product id = "three" >
        <name>Jelly Beans</name>
        <desc>Soft jelly coated in a hard candy shell</desc>
        <price>8.95</price>
		<quantity>4560</quantity>
		<stockholders>Checkers</stockholders>
    </product>

	<product id = "four" >
        <name>Sour straws</name>
        <desc>Soft jelly straw coated in citric acid powder</desc>
        <price>4.99</price>
		<quantity>8500</quantity>
		<stockholders>Boxer</stockholders>
    </product>
	
	<product id = "five" >
        <name>Jaw Breakers</name>
        <desc>Soft coated bubble gum coated with hard candy around it</desc>
        <price>3.95</price>
		<quantity>10000</quantity>
		<stockholders>Hard Candy Store</stockholders>
    </product>
	      
</sweetShop>


What I have tried:

I have tried making space where needed, but still didn't work.
Posted
Updated 25-Nov-21 5:55am
Comments
Richard MacCutchan 25-Nov-21 8:54am    
What is the exact message and which line does it refer to?
Killer (zombiekiller1448) 25-Nov-21 9:00am    
"while loading Q2SHEMA.xsd following error occured: Required white space missing", it says between line 12 and line 13
Richard MacCutchan 25-Nov-21 9:04am    
Well you need to show that part of your xsd file.
CHill60 25-Nov-21 8:56am    
How are you validating this file - I am not getting any errors when I load it into Chrome nor when I load it into XML Notepad nor Notepad++
phil.o 25-Nov-21 9:07am    
Problem is in the schema, not the xml file itself, apparently.

The XML you show has no errors according to online validators such as w3Schools: XML Validator[^]

Start by looking at the software which is giving you the error and trying to identify where in that the problem occurs, and any further error information you can glean from it (such as InnerException data in .NET applications for example).

Sorry, but we can't help you fix what isn't broken!
 
Share this answer
 
The error message is telling you which file the error is in and you posted the wrong file in your question.

You should have posted the content of the Q2SCHEMA.xsd file around the line number where the error message told you the problem was occuring.

Error messages are ALWAYS important. Only newbs ever ignore what they say.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900