|
(no subject) [message #686701 is a reply to message #669234] |
Tue, 10 May 2011 15:00 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Jens,
Comments below.
Jens Keller wrote:
> Hi,
> I have an XML of the following structure:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <langtree>
> <node id="1"/>
> <node id="2"/>
> ...
> </langtree>
>
> So there's no xmlns attribute at the root element.
> But if I want to model this in my ecore and try to remove
> the namespace URI, I always get an error "The namespace URI
> '' is not well formed" respectively "The namespace URI
> 'null' is not well formed".
>
> Is it possible to model it so that the above XML can be
> parsed and my EMF model gets populated?
>
Yes. Try writing a schema for that XML and import that schema to
Ecore. If you invoke Generate Test Code you'll have an XyzExample which
shows you wants needed to read and write unqualified conforming instances...
> Regards Jens
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
(no subject) [message #686858 is a reply to message #669234] |
Tue, 10 May 2011 15:00 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Jens,
Comments below.
Jens Keller wrote:
> Hi,
> I have an XML of the following structure:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <langtree>
> <node id="1"/>
> <node id="2"/>
> ...
> </langtree>
>
> So there's no xmlns attribute at the root element.
> But if I want to model this in my ecore and try to remove
> the namespace URI, I always get an error "The namespace URI
> '' is not well formed" respectively "The namespace URI
> 'null' is not well formed".
>
> Is it possible to model it so that the above XML can be
> parsed and my EMF model gets populated?
>
Yes. Try writing a schema for that XML and import that schema to
Ecore. If you invoke Generate Test Code you'll have an XyzExample which
shows you wants needed to read and write unqualified conforming instances...
> Regards Jens
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02637 seconds