Home > Archive > PHP DB > October 2005 > domxml_open_mem and cdata
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
domxml_open_mem and cdata
|
|
| Matthias Willerich 2005-10-06, 6:55 pm |
| hello,
I hope this isn't too off-topic for the list, if it is, please point me to a
better one:
I have to edit an xml file, and I was going to do that via DOMXML. The
editing process itself is fine, but I now realised that all content that was
in cdata brackets gets stored back without them.
example:
$xml="<content><![CDATA[Hello list.]]></content>";
$dom = domxml_open_mem($xml);
die($dom->dump_mem()); //echoes: <content>Hello list.</content>
I'm on
apache 1.3.33
php 4.4.0
domXML version 20020815
libxml version 20611
and the whole thing is on windows XP
this is of course simplified. if you tried it on your machine, you'll find
an xml header in the output, and of course, my input-xml has one.
The only proof of this that I have found so far is in a german phpforum,
where a guy has the exact same problem, but ly noone replied. That makes
me think that it's either highly uncommon, unsolveable or a stupid error
everyone but me knows.
I'd alternatively use domxml_open_file (if that's the cure), but I get an
I/O error when I try opening a file, relative or absolute paths, same
directory or anywhere else. The content is fine after file_get_contents.
Help is highly appreciated,
Matthias
| |
| Matthias Willerich 2005-10-07, 7:58 am |
| so far no reply, but a little update:
I uploaded it to a linux server, similar setup(PHP4, apache1.3.something),
same problem.
Any ideas for a work-around? What do you use to edit XML on the
(php-)server? I don't have enough time to redo it for MSXML
Cheers,
Matthias
|
|
|
|
|