Hi
It's important to make use of entities - they do have a special meaning in XML - e.g
<quotes source="smh">
"It will be determined under Commonwealth environmental laws, the Commonwealth government will make the decision & it voids state environmental laws," Mr Carr told reporters.
</quotes>
is valid
<quotes source="smh">
"It will be determined under Commonwealth environmental laws, the Commonwealth government will make the decision & it voids state environmental laws," Mr Carr told reporters.
</quotes>
is not valid as " and & have special meaning. Doing this would cause parsing errors.
Running your output through a special character function helps here (makes it all automatic). What's the position on whether it is better to store "entificated" characters in a date store (parse prior to input) or just parse the data prior to output for a User Agent?
To me it would seem better to parse user input so we store ' as ' and & as & or & (for e.g).
Those using PHP to do this should have a look at the following string functions in the PHP core :
http://au.php.net/manual/en/function.html-entity-decode.php
http://au.php.net/manual/en/function.get-html-translation-table.php
http://au.php.net/manual/en/function.htmlentities.php
http://au.php.net/manual/en/function.htmlspecialchars.php
and possibly
http://au.php.net/manual/en/function.urlencode.php (different to special characters but good for encoding query strings for passing to ActionScript)
Cheers James
*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************