WOXMLDecode with a tortuous XML structure?
WOXMLDecode with a tortuous XML structure?
- Subject: WOXMLDecode with a tortuous XML structure?
- From: email@hidden
- Date: Thu, 10 Feb 2005 22:41:00 -0500
Hi,
I'm trying to import some XML objects into web objects classes. I've
figured out how to use the WOXMLDecoderWithMappingModel, but am having
problems when the XML file contains some detours.
For example, the JournalIssue class would be most straightforward if
it looked like this:
JournalIssue
journalName
isnn
volume
issue
publicationDate
However, the structure of the XML looks like this:
<Journal>
<ISNN>0270-7306</ISNN>
<JournalIssue>
<Volume>25</Volume>
<Issue>2</Issue>
<PubDate>
<Year>2005</Year>
<Month>Jan</Month>
</PubDate>
</JournalIssue>
</Journal>
Where the Year, Month, Issue, and Volume information is buried a few
levels in. Without either explicitly adding extraneous JournalIssue
and PubDate classes to the model, is there anyway to keep all the
mapping in the model file and not have to resort to parsing this by
hand?
My model looks like:
<model>
<entity name="JournalIssue" xmlTag="Journal" ignoreUnMappedTags="YES">
<property name="issn" xmlTag="ISSN"/>
</entity>
</model>
Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden