It appears the schema for the urn:us:gov:dot:faa:aim:saa namespace are incomplete. The example document starts with an element SaaMessage in that namespace, but the entrypoint schema you gave does not define that element, nor do the schema it includes. Without a defined element by that name, or an xsi:type attribute on the document element, PyXB creates a generic DOM-compatible instance as the root object, and since that isn't a PyXB binding instance it complains.
That it complains that way is a bug in PyXB, but there's either some missing schemas you need to incorporate, or the document needs to be fixed. Peter On 1/27/2010 2:21 PM, Wendell Turner wrote: > Hi, > > I'm using pyxb to download/compile/generate the bindings for > the FAA's AIXM schema: > > pyxbgen \ > --uri-content-archive-directory downloaded \ > --archive-path '&pyxb/bundles/opengis//:+' \ > --schema-location > http://wendell-y.rho.net/aixm/SAA_AIXM_5_Schemas/SAA-Feature.xsd \ > -m saa > > (and then edit _aixm.py for _Namespace_gml) > > However, when trying to read the sample xml file with this > python program: > import urllib2 > import saa > xml = > urllib2.urlopen('http://wendell-y.rho.net/aixm/SAA_AIXM_5_Schemas/sample-Snowbird.xml').read() > order = saa.CreateFromDocument(xml) > print order > > it gets: > raise pyxb.UnrecognizedElementError(self.__rootObject) > pyxb.exceptions_.UnrecognizedElementError:<pyxb.utils.saxdom.Element > object at 0x9802c0c> > > Any suggestions? Did I generate the files correctly? Is > the supplied sample correct? > > Wendell > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > pyxb-users mailing list > pyxb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyxb-users > ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ pyxb-users mailing list pyxb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyxb-users