Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
Hi,please help, How read this struct in C#:

Struct:
array rows ( Report data rows
array row (
..Row values
)

In XML:
XML
<member>
  <name>rows</name>
  <value>
    <array>
      <data>
        <value>
          <array>
            <data>
              <value>
                <i4>1213028</i4>
              </value>
              <value>
                <string>products</string>
              </value>
            </data>
          </array>
        </value>
      </data>
    </array>
  </value>
</member>





Tom
Posted
Comments
Tarun.K.S 18-Apr-11 9:03am    
Question is unclear. Could you elaborate more?
Debojyoti Majumder 18-Apr-11 9:44am    
Improve your question..
Sandeep Mewara 18-Apr-11 11:18am    
Not clear. Please rephrase and elaborate.

1 solution

I recommend mocking out some stub data inside your code since you obviously know what the structure of your class is(usually 3 layers or items deep in all dimensions is sufficient to smoke test the data structure), then serialize to an xml file (you get the schema for free this way ) and use that to get your data format.

if that doesn't work on the first go modify until you get it right, or tweek your xml to get it into your class..

In the long run this will be way more beneficial to you, as it is always harder to go from xml into class structure then it is to go from class structure to xml.
 
Share this answer
 

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