Click here to Skip to main content
15,867,997 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I try to deserialize xml. My serializer expects this format:
XML
<GetItemTransactionsResponse xmlns:a="http://schemas.datacontract.org/2004/07/eBay.Service.Core.Soap" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <a:mAck>Warning</a:mAck>
        <a:mAckSpecified>true</a:mAckSpecified>
        <a:mAny i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
        <a:mBotBlock i:nil="true"/>
        <a:mBuild>915</a:mBuild>
        <a:mCorrelationID i:nil="true"/>
        <a:mDuplicateInvocationDetails i:nil="true"/>
        <a:mEIASToken i:nil="true"/>



And i want it to expect this format:
XML
<GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
      <Timestamp>2008-02-13T03:47:28.106Z</Timestamp>
      <Ack>Success</Ack>
      <CorrelationID>137541140</CorrelationID>
      <Version>553</Version>
      <Build>e553_core_Bundled_6057805_R1</Build>
      <NotificationEventName>ItemSold</NotificationEventName>
      <RecipientUserID>Seller1</RecipientUserID>
      <Item>


To tell it to support the second format instead of the first i need to tell it to:

1. Use the right namespace. (i think i can handle)
2. Remove the m at the begining for every attribute. (my bigger problem)

I prefer using DataContractSerializer, but its not a must.

Thank you for your help

Dolev
Posted
Comments
Matt T Heffron 5-May-15 20:53pm    
What does your CURRENT code look like?
Without that we don't have a "starting point" for making suggestions.
(Use "Improve question" above.)
Maciej Los 6-May-15 2:14am    
What have you tried?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900