Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » How to create XSDSchema resource from an inputstream
How to create XSDSchema resource from an inputstream [message #29436] Fri, 12 September 2003 21:41 Go to next message
Joshua Hui is currently offline Joshua HuiFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

Many sample code shows how to generate an XSDSchema object from a URI.
Is there a way to generate an XSDSchema object from an inputStream?

Thanks.
Joshua Hui
Re: How to create XSDSchema resource from an inputstream [message #29476 is a reply to message #29436] Fri, 12 September 2003 22:13 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

--------------7160E93BD877ED03F3DCD6B7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Joshua,

Given the environment setup in one of the many samples, you can do this:

Resource xsdResource =
resourceSet.createResource(URI.createURI("your-absolue-schema-uri.xsd "));

xsdResource.load(inputStream, resourceSet.getLoadOptions());
XSDSchema xsdSchema =
(XSDSchema)xsdResource.getContents().get(0);

Joshua Hui wrote:

> Hi,
>
> Many sample code shows how to generate an XSDSchema object from a URI.
> Is there a way to generate an XSDSchema object from an inputStream?
>
> Thanks.
> Joshua Hui

--------------7160E93BD877ED03F3DCD6B7
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Joshua,
<p>Given the environment setup in one of the many samples, you can do this:
<blockquote>&nbsp; Resource xsdResource = resourceSet.createResource(URI.createURI("your-absolue-schema-uri.xsd "));
<br>&nbsp; xsdResource.load(inputStream, resourceSet.getLoadOptions());
<br>&nbsp; XSDSchema xsdSchema = (XSDSchema)xsdResource.getContents().get(0);</blockquote>

<p><br>Joshua Hui wrote:
<blockquote TYPE=CITE>Hi,
<p>Many sample code shows how to generate an XSDSchema object from a URI.
<br>Is there a way to generate an XSDSchema object from an inputStream?
<p>Thanks.
<br>Joshua Hui</blockquote>
</html>

--------------7160E93BD877ED03F3DCD6B7--
Re: How to create XSDSchema resource from an inputstream [message #578089 is a reply to message #29436] Fri, 12 September 2003 22:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31362
Registered: July 2009
Senior Member
--------------7160E93BD877ED03F3DCD6B7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Joshua,

Given the environment setup in one of the many samples, you can do this:

Resource xsdResource =
resourceSet.createResource(URI.createURI("your-absolue-schema-uri.xsd "));

xsdResource.load(inputStream, resourceSet.getLoadOptions());
XSDSchema xsdSchema =
(XSDSchema)xsdResource.getContents().get(0);

Joshua Hui wrote:

> Hi,
>
> Many sample code shows how to generate an XSDSchema object from a URI.
> Is there a way to generate an XSDSchema object from an inputStream?
>
> Thanks.
> Joshua Hui

--------------7160E93BD877ED03F3DCD6B7
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Joshua,
<p>Given the environment setup in one of the many samples, you can do this:
<blockquote>&nbsp; Resource xsdResource = resourceSet.createResource(URI.createURI("your-absolue-schema-uri.xsd "));
<br>&nbsp; xsdResource.load(inputStream, resourceSet.getLoadOptions());
<br>&nbsp; XSDSchema xsdSchema = (XSDSchema)xsdResource.getContents().get(0);</blockquote>

<p><br>Joshua Hui wrote:
<blockquote TYPE=CITE>Hi,
<p>Many sample code shows how to generate an XSDSchema object from a URI.
<br>Is there a way to generate an XSDSchema object from an inputStream?
<p>Thanks.
<br>Joshua Hui</blockquote>
</html>

--------------7160E93BD877ED03F3DCD6B7--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to create XSDSchema resource from an inputstream
Next Topic:comparing XSDTypeDefinitions
Goto Forum:
  


Current Time: Sun Aug 09 18:54:05 GMT 2020

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

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

Back to the top