Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Create a simpleType from a DOM element
Create a simpleType from a DOM element [message #57106] Mon, 17 January 2005 15:24 Go to next message
Klaas Dellschaft is currently offline Klaas DellschaftFriend
Messages: 58
Registered: July 2009
Member
Hi,

I create an XSDSchema instance from a schema file. Another XML file (not a
schema file) contains simpleType definitions which should then be added to
the schema. Therefore I parse the XML file and extract the elements which
represent a simpleType definition.

How is it possible to create new XSDSimpleTypeDefinitions from these
elements and add them to the XSDSchema instance?

Cheers
Klaas
Re: Create a simpleType from a DOM element [message #57134 is a reply to message #57106] Tue, 18 January 2005 13:38 Go to previous message
Klaas Dellschaft is currently offline Klaas DellschaftFriend
Messages: 58
Registered: July 2009
Member
Hi,

I solved the problem myself. If someone is interested here is the solution:


private void parseSimpleType(XSDSchema schema, Element simpleTypeElement) {
XSDSimpleTypeDefinition simpleType = XSDSimpleTypeDefinitionImpl
.createSimpleTypeDefinition(simpleTypeElement);
profile.getUserDefinedSimpleTypes().add(simpleType);
}


It is important that the DOM element is not imported into the DOM document
of the schema.


Cheers
Klaas
Re: Create a simpleType from a DOM element [message #593598 is a reply to message #57106] Tue, 18 January 2005 13:38 Go to previous message
Klaas Dellschaft is currently offline Klaas DellschaftFriend
Messages: 58
Registered: July 2009
Member
Hi,

I solved the problem myself. If someone is interested here is the solution:


private void parseSimpleType(XSDSchema schema, Element simpleTypeElement) {
XSDSimpleTypeDefinition simpleType = XSDSimpleTypeDefinitionImpl
.createSimpleTypeDefinition(simpleTypeElement);
profile.getUserDefinedSimpleTypes().add(simpleType);
}


It is important that the DOM element is not imported into the DOM document
of the schema.


Cheers
Klaas
Previous Topic:Create a simpleType from a DOM element
Next Topic:Performance issues with loading xsds
Goto Forum:
  


Current Time: Wed Sep 18 17:30:54 GMT 2024

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

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

Back to the top