Re: Re: Converting user input for XML-validation
| From: | Michael McGlothlin | Date: | Fri, 16 Nov 2007 19:53:07 +0000 |
| Subject: | Re: Re: Converting user input for XML-validation | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264721@lists.php.net to get a copy of this message | ||
Ralph Kutschera wrote:
Ralph Kutschera wrote:-- Michael McGlothlin Southwest Plumbing SupplyIs there a standard function in PHP to convert any string for usage with XML? In the example the string should become "< thats a bracket".I found htmlspecialchars() now. But the question that remains: Is that sufficient for XML? The only chars XML requires be encoded are < and &. Usually > and quotes are also encoded. So htmlspecialchars() does exactly the right thing.