tukarambande / xmlrpcnet

Automatically exported from code.google.com/p/xmlrpcnet
0 stars 0 forks source link

Add functionality to deserialize standalone XML-RPC values #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Servers sometimes return complex responses containing structs where it not
possible to represent the response as a .NET type. For example in the
response below the array contains items of type boolean and array of
structs. The structs will be mapped to type XmlRpcStruct.

In cases like this it would be useful to be able to deserialize an
XmlRpcStruct into a .NET type to avoid having to unpack the XmlRpcStruct
manually.

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            <value>
              <boolean>1</boolean>
            </value>
            <value>
              <array>
                <data>
                  <value>
                    <struct>
                      <member>
                        <name>id</name>
                        <value>
                          <string>1</string>
                        </value>
                      </member>
                      <member>
                        <name>name</name>
                        <value>
                          <string>Brand Nummer 1</string>
                        </value>
                      </member>
                    </struct>
                  </value>
                  <value>
                    <struct>
                      <member>
                        <name>id</name>
                        <value>
                          <string>2</string>
                        </value>
                      </member>
                      <member>
                        <name>name</name>
                        <value>
                          <string>Brand Nummer 2</string>
                        </value>
                      </member>
                    </struct>
                  </value>
                </data>
              </array>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

Original issue reported on code.google.com by ChasC...@gmail.com on 1 Nov 2008 at 5:18