Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » Serialize XSD Object(Serialize XSD Object having <xs:include> tags )
Serialize XSD Object [message #764953] Tue, 13 December 2011 06:51
Manu  is currently offline Manu Friend
Messages: 7
Registered: November 2009
Junior Member
I have a object of org.eclipse.xsd.impl.XSDSchemaImpl class of a xsd schema [say A.xsd]. This schema has some <xs:include> tags for including other supporting schemas [say B.xsd and C.xsd]. Now I want to convert this XSDSchemaImpl object into a String such that it include all the element definitions which are defined in the supporting included schema [i.e in B.xsd and C.xsd] will be part of this string. I tried it this way but it gives me only A.xsd in the String.
public Writer writeSchema(XSDSchema schema) throws IOException {
    if (schema == null){
    URI schemaUri = URI.createFileURI("");
    Resource resource = new XSDResourceFactoryImpl().createResource(schemaUri);
    XSDResourceImpl xsdResource = (XSDResourceImpl) resource;
            Writer strWriter = new StringWriter();
    try {, null);
    } finally {
            return strWriter ;

I posted the same message here too. As I am not sure which is the correct forum for this. http: // /m/764951/#msg_764951
Previous Topic:Code Generation with Acceleo (Autosar XSD -> C Code)
Next Topic:Load EMF from xml stream
Goto Forum:

Current Time: Thu Nov 26 14:26:04 GMT 2015

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

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