[xsd-users] Libxsd serialize question

Kiran Nittur kiran_nittur at yahoo.com
Tue Jun 12 10:52:14 EDT 2007


Hi,

I am trying to use the code synthesis for xml data binding. As I noticed the root element of the xml is always qualified with the namespace example is shown below highlighted in red. We are using xsdobjectgen tool to generate C# code which will deserialize the xml into C# objects. The deserialize api is failing if there is a namespace in the root element. I would appreciate if you think of any workaround to this issue.
 
Thanks,
 
Kiran
 
<?xml version="1.0"?>
 
<!--
 
file      : examples/cxx/tree/custom/contacts/contacts.xml
author    : Boris Kolpackov <boris at codesynthesis.com>
copyright : not copyrighted - public domain
 
-->
 
<cts:catalog xmlns:cts="http://www.codesynthesis.com/contacts"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.codesynthesis.com/contacts contacts.xsd">
 
  <contact>
    <name>Joe Dirt</name>
    <email>joe at dirt.com</email>
    <phone>555 DIRT</phone>
  </contact>
 
      <contact>
            <name>Kiran Nittur</name>
            <email>knittur at commvault.com</email>
            <phone>555 111</phone>
      </contact>
 
</cts:catalog>


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



More information about the xsd-users mailing list