I'm using the following schema to generate the classes:RetrieveData and
Function

<?xml version="1.0" encoding="utf-8"?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <xs:element name="RetrieveData">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="messageID" type="xs:string"/>
          <xs:element name="interfaceName" type="xs:string"/>
          <xs:element name="function">
            <xs:complexType>
              <xs:attribute name="value" type="xs:string">    
              </xs:attribute>
            </xs:complexType>
          </xs:element>
          <xs:element name="accountNumber" type="xs:string"/>
          <xs:element name="userID" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>  
    </xs:element>  
</xs:schema>

When call marshal, the code generates the following XML:

<?xml version="1.0"?>
<RetrieveData>
<messageID>message1234</messageID>
<interfaceName>interface1234</interfaceName>
<function value="AA"/>
<accountNumber>XXX</cisAccountNumber>
<userID>monika1234</userID>
</RetrieveData>

Is there any way to generate the XML having the closing tag for the element
that contains the attribute in the following way?

<?xml version="1.0"?>
<RetrieveData>
<messageID>message1234</messageID>
<interfaceName>interface1234</interfaceName>
<function value="AA"></function>
<accountNumber>XXX</cisAccountNumber>
<userID>monika1234</userID>
</RetrieveData>

Any help will be highly appreciated,
Thanks,
Monika

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to