Hi Manuel,
Your xsd has an error. The type of the TestItemType element needs to
include the namespace:
<xsd:element name="TestItemType" type="testns:TestItemType"/>
At some point, we really need to improve the error handling.
Frank.
[EMAIL PROTECTED] wrote on 06/25/2007 11:14:07 AM:
> Hi there,
>
> I have a xsd file that looks like this:
>
> ---
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:testns="http://www.test.com/"
> targetNamespace="http://www.test.com/">
>
> <xsd:element name="TestItemType" type="TestItemType"/>
>
> <xsd:complexType name="TestItemType">
> <xsd:sequence>
> <xsd:element name="testelement" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
> ---
>
> Based on that XSD I want to load a xml file that looks like this:
>
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <po:TestItemType xmlns:po="http://www.test.com/">
> <testelement>This is a Test!</testelement>
> </po:TestItemType>
> ---
>
> To load the data I first call
>
> > XSDHelper.INSTANCE.define()
>
> for the xsd file and then
>
> > XMLHelper.INSTANCE.load()
>
> for the xml file.
> But while loading the xml file I always get an exception:
>
> > org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> > Feature 'testelement' not found. (http:///temp.xml, 3, 15)
>
> I do not use any file called temp.xml at all. The files where the xsd
> and xml information are stored are calld "test.xsd" and "test.xml". Does
> anyone have any Idea how to get rid of this error? Thanx in advance.
>
> Best Regards, Manuel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]