XML Tree and spaces

Bill Marriott wjm at wjm.org
Thu May 3 03:43:58 EDT 2007


I think you'll have a much easier go of it if you try to use tags for 
structural aspects of the representation, and use either attributes or the 
contents for data.

In your example, I would use:

<?xml version="1.0"?>
<allTables>
 <Customers IDnum="19">
  <name>Bokomo Botswana</name>
  <name>BOTEC</name>
  <name>Gemini Logistics</name>
 </Customers>
</allTables>

or

<?xml version="1.0"?>
<allTables>
    <table name="Customers" IDnum="19">
        <row name="Bokomo Botswana">
        </row>
        <row name="BOTEC">
        </row>
        <row name="Gemini Logistics">
        </row>
    </table>
</allTables>

There could be a lot of other ways you can group it. The basic concept here 
is to relate the idea of tags in XML to tags in HTML (if you're familiar 
with that). You might put a <p author="Nic"> </p> tag around a paragraph, 
you wouldn't have a <Nic> </Nic> tag.


--- Original Message ---
Nic Prioleau wrote:

[...]the xml below is produced as a result of the code in the mouseUp 
handler
beneath it. It is then sent to a field whose code is stored in the attached
txt file.

<?xml version="1.0"?>
<allTables>
 <Customers IDnum="19">
  <Bokomo Botswana>
  </Bokomo Botswana>
  <BOTEC>
  </BOTEC>
  <Gemini Logistics>
  </Gemini Logistics>
 </Customers>
</allTables>







More information about the use-livecode mailing list