Title: Xml mapping question

Hey all,
  I have a simple xml document that looks like this:
<MDADocument>
    <defenseDesignDocument>
        <documentName>JDP Defense Design</documentName>
        <creationDate>2005-07-21T11:39:39</creationDate>
        <createdBy>JDP</createdBy>
        <classification>UNKNOWN</classification>
    </defenseDesignDocument>
</MDADocument>

I map it with this xml document:
<mapping>
    <class name="xml.plan.PlanData">
<field name="defenseDesignDocument" type="string" >
        <bind-xml name="defenseDesignDocument" node="element"/>
                </field>

        <field name="documentName" type="string" >
        <bind-xml name="documentName" node="element"/>
                </field>
        <field name="creationDate" type="string" >
        <bind-xml name="creationDate" node="element"/>
        </field>
        <field name="createdBy" type="string" >
        <bind-xml name="createdBy" node="element"/>
        </field>
                <field name="classification" type="string" >
        <bind-xml name="classification" node="element"/>
        </field>
    </class> 

For some reason it will not unmarshal.  I am assuming it is b/c of the defenseDesignDocument entry in the xml document.  I guess the unmarshaller is looking for a value inside or something.  How can I get by this?  I know that I will only have one entry for the defenseDesignDocument in the xml document so I don't think an extra class is necessary.  Or am I wrong.  How would any of you do it?

Thanks,
Jason


Jason Green
Software Engineer
Northrop Grumman MS
[EMAIL PROTECTED]
(540) 469-2407

Reply via email to