title: XML mapper... XE2
body: <p>I have an xml from a webservice that I want to store in a ClientDataSet.</p>
  
  <p>When using the XML mapper no data is shown in the grid (when using the
  "Create and Test Transformation"), so I'm not able to use the
  transformation file...</p>
  
  <p>Here is some of the response XML from the C# Webservice (one row of data)...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://www.w3.org/2003/05/soap-envelope"&gt;
  &lt;soap:Body&gt;
  &lt;AllResponse xmlns="http://some.url.com/"&gt;
  &lt;AllResult&gt;
  &lt;xs:schema xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="NewDataSet"&gt;
  &lt;xs:element msdata:UseCurrentLocale="true" msdata:IsDataSet="true" name="NewDataSet"&gt;
  &lt;xs:complexType&gt;
  &lt;xs:choice maxOccurs="unbounded" minOccurs="0"&gt;
  &lt;xs:element name="Table"&gt;
  &lt;xs:complexType&gt;
  &lt;xs:sequence&gt;
  &lt;xs:element name="Id" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="UserName" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Name" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="PhoneInt" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="CostCentre" minOccurs="0" type="xs:int"/&gt;
  &lt;xs:element name="GroupRoleNameDK" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="GroupRoleNameUK" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Email" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Url" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="PhoneAlt" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="PhoneMobile" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Fax" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="EducationNameDK" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="EducationNameUK" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Location" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="PhoneNote" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="Personid" minOccurs="0" type="xs:int"/&gt;
  &lt;xs:element name="GroupId" minOccurs="0" type="xs:int"/&gt;
  &lt;xs:element name="GroupNameDK" minOccurs="0" type="xs:string"/&gt;
  &lt;xs:element name="GroupNameUK" minOccurs="0" type="xs:string"/&gt;
  &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;/xs:choice&gt;
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  &lt;diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&gt;
  &lt;NewDataSet xmlns=""&gt;
  &lt;Table diffgr:id="Table1" msdata:rowOrder="0"&gt;
  &lt;Id&gt;P-4&lt;/Id&gt;
  &lt;UserName&gt;auser&lt;/UserName&gt;
  &lt;Name&gt;Somename&lt;/Name&gt;
  &lt;PhoneInt&gt;aPhone&lt;/PhoneInt&gt;
  &lt;CostCentre&gt;0&lt;/CostCentre&gt;
  &lt;GroupRoleNameDK&gt;WebService&lt;/GroupRoleNameDK&gt;
  &lt;GroupRoleNameUK&gt;WebService&lt;/GroupRoleNameUK&gt;
  &lt;Email&gt;aname@acompany.com&lt;/Email&gt;
  &lt;Url&gt;http://www.embarcadero.com&lt;/Url&gt;
  &lt;PhoneMobile&gt;12345678&lt;/PhoneMobile&gt;
  &lt;Fax&gt;87654321&lt;/Fax&gt;
  &lt;Personid&gt;4&lt;/Personid&gt;
  &lt;GroupId&gt;618&lt;/GroupId&gt;
  &lt;GroupNameDK&gt;Danish Group&lt;/GroupNameDK&gt;
  &lt;GroupNameUK&gt;GroupName&lt;/GroupNameUK&gt;
  &lt;/Table&gt;
  &lt;/NewDataSet&gt;
  &lt;/diffgr:diffgram&gt;
  &lt;/AllResult&gt;
  &lt;/AllResponse&gt;
  &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>The schema seems to be well defined, so I'm a bit puzzled, why it
  doesn't work.
  I have noticed that some of the fields have &lt;Field/&gt; instead of
  &lt;Field&gt;&lt;/Field&gt; when the field is empty - doesn't know if that matters...</p>
  
  <p>Any idea how I get along?</p>
  
  <p>-Kurt</p>