
Signature
Joe (MVP - XML)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
Thanks, can you tell me why my XML code is poor? Is it because the data for
each employee, i.e. name and ssn aren't properly encapsulated under the root
element?
How does the binding from XML to Access actually work? Root element is
table name, then what?
>> Hi,
>>
[quoted text clipped - 38 lines]
> </Employee>
> </Employees>
Martin Honnen - 29 Jul 2005 19:12 GMT
> can you tell me why my XML code is poor? Is it because the data for
> each employee, i.e. name and ssn aren't properly encapsulated under the root
> element?
As Joe suggested if you want to have a <Name> element and a <SSN>
element belong together as the data of an employee then you should have
an <Employee> element encapsulating that data.
Putting everything as a child element of <Employees> as you had does not
make it clear that for instance <Name>Russell</Name> belongs to
<SSN>123457890</SSN>.
While processing sibling elements is possible it is usually much harder
and less efficient than accessing the child elements of a semantically
clearly named parent element.

Signature
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/