Sorry Keith, I was really meaning UnMarshalling. I'm not so concerned with
marshalling. Marshalling would be nice but I would really like to be able
to unmarshall two xml documents into one object.
Example: If I had a file like this, I could easily unmarshall into my java
object.
Product.xml
<product>
<price></price>
<details>
<name></name>
<description></description>
<category></category>
<amount></amount>
</details>
</product>
What I would like is to take the <details> out of this file, put it into
another file and then reference from the first file. So now it looks
something like this?
Product.xml would contain something like this?
<product>
<price>
</price>
<details href="http://me.you.com/xmlfiles/details.xml" />
</product>
Details.xml would contain something like this?
<details>
<name></name>
<description></description>
<category></category>
<amount></amount>
</details>
Both these would produce the same outcome, a Product Object that contains a
price and a Details object.
Currently we have something in place that can do this however the creation
of the objects to support this facility is rather dedious. It would be nice
to be able to use castor for this, and use it's SourceGenerator to create
the objects from an XSD file. SWEET ;-)
Any help you can give would be greatly appreciated.
TIA
--ekiM
R&D Hummingbird Core Services
613.548.4355 x1535 | 613.548.7801
-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 1:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] XML Marshalling support links to other XML
documents?
Hi Mike,
Can you give an example of what you expect Castor to produce?
Castor only marshals into a single document, or single
ContentHandler/DocumentHandler. If you want Castor to marshal to two
separate files in a single marshalling step, then you'll need to create your
own ContentHandler which can do that for you.
Castor can certainly create:
<product>
<price>
</price>
<details href="http://me.you.com/xmlfiles/details.xml" />
</price>
</product>
As long as your object model contains a Details object with an href String
field.
--Keith
Mike Wannamaker wrote:
>
> I was just wondering if castor's marshalling would support linking in
> another document via an href type tag?
>
> <product>
> <price>
> </price>
> <details href="http://me.you.com/xmlfiles/details.xml" />
> </price>
> </product>
>
> Details.xml would contain something like this?
>
> <details>
> <name></name>
> <description></description>
> <category></category>
> <amount></amount>
> </details>
>
> Is this concept even possible with castor?
>
> --ekiM
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user