Re: newbie no matching global decalartaion available for the validation root.
![](https://secure.gravatar.com/avatar/bc4259003fffe3e1cb3543db975bea0d.jpg?s=120&d=mm&r=g)
Hi,
I create an XML Schema which parses correctly. it starts with : <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace = "http://www.ludd21.com/KnittingModel" xmlns = "http://www.ludd21.com/KnittingModel" elementFormDefault="qualified">
<xsd:complexType name = "KnittingModel" >
I created a XML document with the E.factory. It is like this : mymodel = ( E.knittingModel ( E.modelname ("mymodel")
I get the above rerror and I canot find out how to add in the E.factory the missing element. Could you help? I thnak you in advance
Unfortunately parts of the schema and code are missing in your post, e.g. the actual toplevel element(s) (not complexType) of the schema. It's difficult to judge what triggers the error unless you post your full (minimal) code and schema. That said I suspect a namespace problem. You might want to look up on using namespaces with an E-factory, see https://lxml.de/tutorial.html#the-e-factory. Again, this can't be seen from your snippet so it might or might not be a reason. Best, Holger Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart HRA 4356, HRA 104 440 Amtsgericht Mannheim HRA 40687 Amtsgericht Mainz Die LBBW verarbeitet gemaess Erfordernissen der DSGVO Ihre personenbezogenen Daten. Informationen finden Sie unter https://www.lbbw.de/datenschutz.
participants (1)
-
Holger.Joukl@LBBW.de