DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Java
Reload this Page How to get the type of a attribute component in a .xsd file?
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default How to get the type of a attribute component in a .xsd file? - 07-12-2009, 10:32 PM

A xsd file needs to be parsed and analyzed, there is a attribute as follows,

<attribute name="arrivalMoment" use="required">

<simpleType>

<restriction base="integer">
<minInclusive value="0"/>
</restriction>
</simpleType>
</attribute>

need to show a table like
----------------------------
name | datatype |
----------------------------
arrivalMoment | integer |
----------------------------

I got some useful methods from org.apache.xerces.impl.xs
org.apache.xerces.xs, but still can not got the right way to get this datatype.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Join Date: Jun 2009
Default 07-12-2009, 10:54 PM

Have fixed.
String dataType = ((XSAttributeUseImpl) list.item(j)).fAttrDecl.getTypeDefinition().getBas eType().getName();
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HandlerChain annotation name attribute deprecated. BaswaSatya Web Services, SOA & ESB 0 06-05-2009 07:23 AM
EMF Label not in center of component Gilod Eclipse 0 06-02-2009 04:37 PM
[error] The type parameter Employee is hiding the type Employee jon80 Eclipse 0 05-17-2009 03:23 PM
Where is the Component Palette? DavidGriffiths Eclipse 0 01-08-2009 01:30 AM
Move Member Type to New File jackm Eclipse 0 09-24-2008 06:59 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com