Converting user input for XML-validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hallo!

  I'm having an HTML-form where the user can input anything. With PHP
I'm processing the input to XML like

<userinput>what the user has entered</userinput>

Now, if the user enters e.g "< thats a bracket", that gives

<userinput>< thats a bracket</userinput>

which of course does not validate.

Is there a standard function in PHP to convert any string for usage with
XML? In the example the string should become "&lt; thats a bracket".

Thanks a lot,
  Ralph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux