![]() |
![]() ![]() ![]() |
||
|
|||
Reading and comparing text data |
A simple form to handle data:
|
||
The text is sent as the content of guess tags, within the CGI tags i.e. a guess sub-object of the object CGI. Note that some web-browsers don't like the INPUT tag to be closed, but as this isn't well-formed XML (all tags closed) then whenever you use an XML-based tool (like X-Tract) you need to replace the left-hand "<" with "<". This stops the parsing engines from complaining about badly-formed XML.
|
|||
Handling HIDDEN values |
In the above, you might want to keep track of the number of guesses they made. Within the FORM tags, add another INPUT tag. This one won't be seen by the person making the guesses.
|
||
So rewrite the above template thus:
|
|||
Number crunching |
XML Script defines several functions for handling numeric data: adding, multiplication, modulus, averaging... so you could process any amount of numeric data server-side and then return a file with the results embedded in it. Simple processing is very trivial indeed:
|
||
More complicated processing can be achieved by sending several CGI name/value pairs, with the same name. If they are all called e.g. "subobject," then the following processing can easily be done by X-Tract:
|
|||
Next... | |||
XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited© Copyright 1998-2000 DecisionSoft Limited |