You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Akacem Mohammed <Mo...@arbeitsamt.de> on 2003/01/07 17:29:27 UTC
& within a string / parser expects an entity reference
Hello ,
I am using Schemata to parse an xml file. and have among other the following element
<xs:element name="Firmname">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="90" />
</xs:restriction>
</xs:simpleType>
</xs:element>
the firmmname element contains an & charachter for example: Gmbh & Co.KG
the SaxParser is throwing the following error:
Fatal_Error The entity name must immediately follow the '&' in the entity reference. at line: 7
How should I change the definition of my element in the *.xsd file so that the parser doesn't expects an
entity reference
thanks for any help
Mohammed
Re: & within a string / parser expects an entity reference
Posted by James Carman <ja...@carmanconsulting.com>.
The XML is invalid. It's not the schema giving you the problem. You need
to use a & instead of &.
----- Original Message -----
From: "Akacem Mohammed" <Mo...@arbeitsamt.de>
To: <ax...@xml.apache.org>
Sent: Tuesday, January 07, 2003 11:29 AM
Subject: & within a string / parser expects an entity reference
> Hello ,
>
> I am using Schemata to parse an xml file. and have among other the
following element
>
> <xs:element name="Firmname">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:maxLength value="90" />
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
>
> the firmmname element contains an & charachter for example: Gmbh & Co.KG
> the SaxParser is throwing the following error:
>
> Fatal_Error The entity name must immediately follow the '&' in the entity
reference. at line: 7
>
> How should I change the definition of my element in the *.xsd file so that
the parser doesn't expects an
>
> entity reference
>
> thanks for any help
>
> Mohammed
>
>
>