Simple XML problem

software development

#1

I need to display some code that the user has to type in.
this code has some “<” and “>” in it.
I’m doing it all in XML and need the XML parser NOT to think that this "blah code blah "is part of the page on which it is displayed.
I bet it’s like PHP where you use forwardslashes but really not sure…
Any clues?
Thanks.


#2

PHP htmlentities()


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

To be more specific:

Whatever script receives the form input should convert < and > to < and > which are the XML-defined character entities for < and >. Any compliant XML parsing software should deal with those correctly. You can decide whether you want to store the user’s input as-entered (< and >) and convert to entities every time you output from your storage, or store it as < and > and convert those back to < and > for editing within the form.