Re: Generating proper XML with PHP
- From: Tim Van Wassenhove <timvw@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 18:29:01 +0000 (UTC)
On 2005-07-27, Ken <2jghb3a02@xxxxxxxxxxxxxx> wrote:
> I wrote a simple php script that generates an XML file based on a DB
> query. The problem is that some of the db entries may contain tabs,
> gt/lt signs, and other XML-unfriendly characters.
>
> Is there a stock function for replacing these with their proper XML
> escape sequences? I suppose I could do it with regex, but it seems this
> would be so common that it's silly to write it over again.
As already mentionned, htmlentities and the like can do a lot..
Or you could use XML it's <![CDATA[ ]]>
--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
.
- References:
- Generating proper XML with PHP
- From: Ken
- Generating proper XML with PHP
- Prev by Date: Re: Show countdown from 10 to 0 seconds
- Next by Date: Re: Show countdown from 10 to 0 seconds
- Previous by thread: Re: Generating proper XML with PHP
- Next by thread: Re: Generating proper XML with PHP
- Index(es):