Inserting into XML tables at arbitrary points

Bill Humphries whump at apple.com
Tue Mar 19 14:11:17 PST 2002


On Tuesday, March 19, 2002, at 01:43 PM, Brian Ablaza wrote:

> If you need to insert an element between element 5 and element 6, just 
> preface it with 000050010 (or some such). You can therefore insert up to 
> 9,999 elements between element 5 and element 6.

Yes, that's a much less onurous solution to the problem and avoids any 
potential problems created by copying tables, as well as the overhead.

> I have never seen any documentation to indicate that there is a permanent 
> relationship between the name of the xml object and its index in the 
> table, so I don't think anything will break. In fact, I believe that the 
> more important function of the leading number string is to allow objects 
> with the same name to co-exist in the same table (something that is not 
> permitted in Frontier, but is common in xml). So it may not matter at all 
> to Userland what those leading 9 characters are, as long as they make a 
> unique name.

Hey Dave! Can we get a clarification on this? I'd much rather write 
something that creates a new element without copying over or iterating 
through all the nodes.

-- whump





More information about the Frontier-Users mailing list