Hi.
I'm trying to develop a program that uses XML files store data. I'm using
Windows XP, Apache 1.3.29 and PHP 4.3.4.
Right now the XML file is read using the xml_parser_create(),
xml_set_element_handler() etc. functions. I have difficulties with special
characters in the data.
I found information on "<![CDATA[ special chars here ]]>", UTF-8, XML DOM,
htmlentities(), and more, but I'm confused with all these terms and their
meaning.
I think I should use CDATA sections anyhow, right? Or is this UTF-8 a way to
use special characters without bothering the XML parser?
Long ago I used a DOM in Perl and liked it, is it hard to use the PHP XML
DOM and is it (part of a) solution to my problem?
Right now (with the xml_parser_ functions) my program outputs something like
<img alt="Data from XML file, sometimes with "quotes".">
to the browser, which isn't right because of the early end-quote. Where and
how should I avoid this? This is where htmlentities fits in, right? And I
once read something about PHP settings dealing with HTML characters.
It's not that I'm lazy, but there's a lot of information on a lot of
interrelated subjects. Who can help me out here please?
Regards,
- John van Terheijden, the Netherlands