Re[2]: [xml] xmlNodeGetContent() bug?



On Thu, 12 Jun 2003, Alexander Grimalovsky wrote:

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('&lt;'));
$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('&gt;'));
echo $xml->dump_node($root)."\n";
echo $root->get_content()."\n";
?>

 Gives me:
<root>&lt;text_1&test;text_2&gt;</root>
text_1text_2

If you can re-create this using the C API or the Python bindings, then submit
that as a test case, else report your findings on bugs.php.net .

Elfyn

-- 
Elfyn McBratney (mailto:spambot is ubertales co uk)
Systems Administrator
ABCtales.com / Ubertales.co.uk




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]