Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Parsing of xml with xs:any element with different namespaces(Mixed namespace xml parsing and editing how to)
Parsing of xml with xs:any element with different namespaces [message #1834829] Wed, 18 November 2020 16:47 Go to next message
Nicola Calgaro is currently offline Nicola CalgaroFriend
Messages: 1
Registered: November 2020
Junior Member

I've got pure generated EMF code coming from a specific xsd file related to a model "A". Inside this xsd there are several elements of type "any" like:

          <xs:element name="Value" minOccurs="0">
                <xs:any minOccurs="0" processContents="lax" />

When I load a resource there are no validation checks on content of that elements but in the xml that I'm loading I can found that data inside "Value" tag for example is modeled by a specific namespace (tags inside the element "any" have prefix related to a specific namespace):


I've got also the xsd for the second model "B" and I can generate java code also for that model but I don't know how to give the possibility to the editor generated for the model "A" to manage "any" elements by java code generated for model "B" in order parse them correctly (and not in the way you can see in the attached screenshot) and also to have the possibility to have the correct "add child" commands with reference to model "B" types.

Best regards,

Re: Parsing of xml with xs:any element with different namespaces [message #1834839 is a reply to message #1834829] Wed, 18 November 2020 19:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32668
Registered: July 2009
Senior Member
There simply is not enough information in this post to provide answers. There is no schema for A nor B. There is no full XML sample that shows what namespace is bound to prefix xyz in the snippet. There's just no way to come close to reproducing what you are seeing. There's just not enough to guess. what code you've written to try to load...

Ed Merks
Professional Support:
Previous Topic:arrayIndexOutOfBound Exception with ResourceSet.getResource
Next Topic:Element matching
Goto Forum:

Current Time: Wed Feb 08 21:30:57 GMT 2023

Powered by FUDForum. Page generated in 0.02104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top