Re[2]: [xml] xmlNodeGetContent() bug?
- From: Alexander Grimalovsky <flying dom natm ru>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re[2]: [xml] xmlNodeGetContent() bug?
- Date: Thu, 12 Jun 2003 21:27:01 +0400
Hello Daniel,
Thursday, June 12, 2003, 7:17:02 PM, you wrote:
DV> On Thu, Jun 12, 2003 at 06:32:48PM +0400, Alexander Grimalovsky wrote:
$root->append_child($xml->create_entity_reference('A'));
DV> A is NOT an entity reference. It's a *character reference*. This
DV> has nothing in common, it's just a shorhand for a given Unicode code point.
Ok, maybe. But putting here normal entity reference does nothing too.
<?php
$xml = xmldoc('<?xml version="1.0"?><!DOCTYPE root [<!ENTITY test "some text">]><root/>');
$root = $xml->root();
$root->append_child($xml->create_entity_reference('<'));
$root->append_child($xml->create_text_node('text_1'));
$root->append_child($xml->create_entity_reference('&test;'));
$root->append_child($xml->create_text_node('text_2'));
$root->append_child($xml->create_entity_reference('>'));
echo $xml->dump_node($root)."\n";
echo $root->get_content()."\n";
?>
Gives me:
<root><text_1&test;text_2></root>
text_1text_2
DV> Daniel
--
Best regards,
Alexander mailto:flying dom natm ru
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]