I’m not sure if this is your question but if you’re XML Schema has :-

 

<xs:any>

 

Then after unmarshalling, you can do a

 

xxx.getAnyObject()

 

on the element that contains the any node, which gives an Object[].

 

If you want to unmarshall the any node contents separately you just

marshall each Object in the array to the same StringWriter. This gives you the contents of the any node as an XML String.

 

You can then unmarshall the XML String using castor to another set of castor generated classes providing you have an XML Schema(s) for the any node portion or a mapping file.

 

Pete

 


From: Vaidya, Prajakta P [mailto:[EMAIL PROTECTED]
Sent: 17 March 2004 14:10
To: [EMAIL PROTECTED]
Subject: [SPAM] - [castor-dev] Casting AnyObject into Castor object - Sending mail server found on relays.ordb.org

 

 

I am repeating my previous question here and hope to explain it better.

 

I have two xsd files “mets” and “VideoMD”.

 

The “Mets” xsd contains an <any> element. As part of my application, I know that I will have VIDEOMD elements present as the AnyObject.

 

I want to access the fields of this VIDEOMD element. When I retrieve the AnyObject , and query its class, it returns this as VIDEOMD. But I do not understand if I can unmarshall this AnyObject into the VIDEOMD object. This appears like a dynamic unmarshall operation.

 

I have been reading the message board and couldn’t figure this out. Any help would be appreciated.

 

Thanks,

Prajakta

This transmission is confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you have received this transmission in error, please notify the sender immediately. Any opinions or advice contained in this e-mail are those of the individual sender except where they are stated to be the views of RDF Group or EMS plc. All messages passing through this gateway are virus scanned.

Reply via email to