Ken,

Did you try adding the attribute="YES" in your mapping file as in this line from the following XML?

...
     <property name="title" xmlTag="name" attribute="YES"/>
...

XML:
    <command>
      <customer>
        <name>Ringle</name>
        <rental_date>1989-12-07 23:46:11 Etc/GMT</rental_date>
      </customer>
      <fullMovie name="Alien">
        <cat>Horror</cat>
        <role name="Ash"></role>
        <role name="Ripley"></role>
      </fullMovie>
    </command>

Mapping:
 <model>
   <entity name="Command" xmlTag="command">
     <property name="movie" xmlTag="fullmovie"/>
     <property name="customer" xmlTag="customer"/>
   </entity>
   <entity name="MyMovie" xmlTag="fullmovie">
     <property name="title" xmlTag="name" attribute="YES"/>
     <property name="roles" xmlTag="role">
     <property name="category" xmlTag="cat"/>
   </entity>
   <entity name="com.webobjects.eocontrol.EOGenericRecord" xmlTag="role">
     <property name="roleName" xmlTag="name" attribute="YES"/>
   </entity>
   <entity name="Customer" xmlTag="customer">
     <property name="name" xmlTag="name"/>
     <property name="date" xmlTag="rental_date"/>
   </entity>
 </model>

On Feb 17, 2006, at 5:28 PM, Ken Anderson wrote:

I'm attempting to decode some XML using mapping models and WOXMLDecoder.  The documentation is quite sparse.  The documentation does not have an example to parse something like this:

<Tag Attribute="Something">20000</Tag>

Has anyone built a mapping file that works for this?  The issue is the combination of a value along with attributes.  The examples in the doc handle:

<Tag>20000</Tag>

as well as:

<Tag Attribute="Hello">
<Value>20000</Value>
</Tag>

Thanks,
Ken

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to