Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Problem Deserializing xml to class using DataContractSerializer

Problem Deserializing xml to class using DataContractSerializer

Scheduled Pinned Locked Moved WCF and WF
lampsalesxmlhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brynjar Smari Bjarnason
    wrote on last edited by
    #1

    Hello. I have a problem deserializing a xml reply to a class. The message I receive is: <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <ItemsSummary> <ItemSummary>    <No>1000</No>    <Description>Bicycle</Description>    <Description2 />    <ImagePath />    <Dim1Code>SALES</Dim1Code>    <Dim2Code>MERCEDES</Dim2Code>    <Division />    <ItemCategory>MISC</ItemCategory>    <ProductGroup />    <Inventory>30</Inventory>    <UnitPriceVAT>502.462,06</UnitPriceVAT>    <CurrencyCode>ISK</CurrencyCode> </ItemSummary> <temSummary>    <No>1500</No>    <Description>Lamp</Description>    <Description2 />    <ImagePath />    <Dim1Code />    <Dim2Code />    <Division />    <ItemCategory />    <ProductGroup />    <Inventory>818</Inventory>    <UnitPriceVAT>0,00</UnitPriceVAT>    <CurrencyCode>ISK</CurrencyCode> </ItemSummary> </ItemsSummary> I have a class structure: <pre>namespace WebService {       [DataContract(Namespace="")]       [KnownType(typeof(ItemSummary))]       public class ItemsSummary       {             private List<ItemSummary> _itemSummary = new List<ItemSummary>();             [DataMember(Order = 1)]             public List<ItemSummary> ItemSummary             {                   get                   {                         return _itemSummary;                   }                   set              &

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups