Home
About
Agents
CGIs
Mac
Macros
Misc
Stories
Suites
Websites
Outline
Frontier
Scripting

workspace.xmlWriteExamples

This is a fat page containing workspace.xmlWriteExamples.

It visits every cell in system.verbs.builtins.xml.examples, and for each cell
called taggedText, it creates a file in a folder on your system disk called xml
examples. It creates the folder if it doesn't exist.

I wrote this script because I'm preparing to test Frontier's XML compatibility with
Microsoft's XML Notepad mini-app. Now that we have something to
test against, it's a good time to explore compatibility issues. After all the
point of XML is to be compatible with other software.

Listing

Here's a listing of the script:

local (adrtable = @system.verbs.builtins.xml.examples)
local (folder = file.getSystemDisk () + "xml examples" + file.getPathChar ())
file.sureFolder (folder) //create the folder if it doesn't exist
on visit (adr)
if string.lower (nameOf (adr^)) != "taggedtext" //only write out objects called taggedText
return (true)
local (f = folder + nameOf (parentOf (adr^)^) + ".xml") //it gets its name from its parent
msg (f) //display the file name in the About Frontier window
file.writeWholeFile (f, string (adr^))
return (true)
table.visit (adrtable, @visit)

Screen shot

Here's a screen shot of the table we traverse.


This is a fat web page containing workspace.xmlWriteExamples. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 8/4/98; 6:23:39 AM and it was last built on 9/11/98; 9:23:19 AM. Webmaster: dave@userland.com.