My sample xml is as below:
 
<TryRequest xmlns:api="http://www.fedex.com/fsmapi"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="FDXRateRequest.xsd">
<TryHeader>
<CustomerTransactionIdentifier>CTIString</CustomerTransactionIdentifier>
<AccountNumber>123456789</AccountNumber>
<MeterNumber>1234567</MeterNumber>
<CarrierCode>FDXE</CarrierCode>
</TryHeader>
</Try>
 
When I generated XSD:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<element name="TryRequest">
 <complexType>
  <sequence>
   <element name="TryHeader">
    <complexType>
     <sequence>
      <element name="CustomerTransactionIdentifier1" type="string"/><element 
name="AccountNumber1" type="integer"/>
      <element name="MeterNumber1" type="integer"/>
      <element name="CarrierCode1" type="string"/>
     </sequence>
    </complexType>
   </element>
  </sequence>
  <attribute name="noNamespaceSchemaLocation" type="string"/>
 </complexType>
</element>
</schema>
 
Generated classes for this XSD and created an instance of the TryRequest class 
and unmarshalled it to create XML string. In this XML: I do not see 
xmlns:api="http://www.fedex.com/fsmapi"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
in <TryRequest ...> tag. 
 
How can I get these strings( into the main tag as attributes..) 
programmatically.
 
Thanks

 

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to