Hi Dave,
> I still am wanting a simple spec that says, in the same way
> the existing spec does, what a person writing a callback
> would do to create a hierarchy. I can't read minds, and
> asking me to wade through the code is not fair (and I'm not
>
Sorry, but I've only just realised what it is you have been asking for.
I'm honestly not trying to make you read my code, I wouldn't do that to
anyone ;-) Besides I am very grateful to you for coming back to these
callbacks again, especially now that you're so busy with other things.
I've tried to copy - as far as I can - the style of your own document.
Please let me know if I've missed the mark with this, or whether there
are further changes you would like for me to make.
--------------------------------------------------
Nested sub-elements
Here is what you do if you need to add elements with a nested structure.
As in the <item> callback example for adding an element with attributes
the trick is to use sub-table's. This time you create nested sub-tables
to match the nesting of the elements in the XML - one sub-table for each
element. As before you can use tabs in the table names if you need more
than one element with the same name.
Here's an example callback script:
http://matt.blogs.it/images/elementWithMultipleLevels.jpg
And here's the XML that's generated:
<person id="jsmith03">
<givenName>John</givenName>
<familyName>Smith</familyName>
<secret>
<password>gemini</password>
</secret>
</person>
This technique works at the <channel> or <item> level.
--------------------------------------------------
Notes
1) I've uploaded the script I used for the screen grab to
http://matt.blogs.it/gems/writeRssItemElement.elementWithMultipleLevels.
ftsc in case you want to reformat it.
2) I noticed a problem with the XML generated by my patched
writeRssFile(). It would generate:
<firstName>John
</firstName>
instead of:
<firstName>John</firstName>
I've re-uploaded that object at
http://matt.blogs.it/gems/workspace.writeRssFile.ftsc in case it might
be useful to you.
Regards,
Matt