aspose file tools*
The moose likes XML and Related Technologies and the fly likes reading xsd from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "reading xsd from java" Watch "reading xsd from java" New topic
Author

reading xsd from java

suresh reddy reddy
Greenhorn

Joined: Jan 19, 2010
Posts: 12
Hi ,can any one help me on how to read the below given xsd file and prepare html file

............
<xs:attribute name="type" use="optional">
<xs:annotation>
<xs:documentation>"seqnum" - Unique by system generated sequence number. </xs:documentation>
<xs:documentation>"code" - Unique by code string.</xs:documentation>
</xs:annotation>
...........



Thanks in advance
Regards
suresh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42592
    
  65
Welcome to JavaRanch.

What, exactly, do you mean by "read"? If you want to treat it as XML, then the easiest way to transform it into HTML would be to use an XSLT transformation.


Ping & DNS - my free Android networking tools app
suresh reddy reddy
Greenhorn

Joined: Jan 19, 2010
Posts: 12
Thank you for reply,

my requirement is like this
Get the data from xsd (through java code ) file and prepare html ,is it possible ,if possible example please....

Regards
Suresh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42592
    
  65
What is "the data" - you need to be specific. How would the generated HTML look like for the code you posted above?
suresh reddy reddy
Greenhorn

Joined: Jan 19, 2010
Posts: 12
say one file like test.xsd which contains data
.........
<xs:attribute name="type" use="optional">
<xs:annotation>
<xs:documentation>"seqnum" - Unique by system generated sequence number. </xs:documentation>
<xs:documentation>"code" - Unique by code string.</xs:documentation>
</xs:annotation>
....................


in the above sample code i want 1. "seqnum" - Unique by system generated sequence number.
2. "code" - Unique by code string.

in dropdown box of html

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42592
    
  65
You could use XPath to grab the "xs:documentation" nodes, and then retrieve the child node that contains the nested text.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading xsd from java