Home » XML » XML_FastCreate » Bug #7030
Tag function should expand XML_FastCreate objects
Details
| Request #7030 | Tag function should expand XML_FastCreate objects |
|---|---|
| Submitted | 2006-03-06 11:29 UTC |
| From | br at absb dot de |
| Assigned | neokod |
| Status | Closed |
| Package | XML_FastCreate |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-03-06 11:29 UTC] br at absb dot de
Description:
------------
If you try to call the appended script constellation, the <z> tag contains the string "Object" instead of $fooxml's content.
Test script:
---------------
$fooxml = XML_FastCreate::factory('Text');
$fooxml->footag(
$fooxml->bartag('Hello World!'),
$fooxml->bartag('AYBABTU')
);
$barxml = XML_FastCreate::factory('Text');
$barxml->x(
$barxml->y('Blubb!'),
$barxml->z($fooxml)
);
$barxml->toXML();
Expected result:
----------------
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<x>
<y>Blubb!</y>
<z>
<footag>
<bartag>Hello World!</bartag>
<bartag>AYBABTU</bartag>
</footag>
</z>
</x>
Actual result:
--------------
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<x>
<y>Blubb!</y>
<z>Object</z>
</x>
[2006-03-06 11:48 UTC] neokod at php dot net
Thank you for taking the time to write to us, but this is not
a bug.
Hi,
This results is the expected behavior.
To do what's your want, you can uses the toXML() method :
$barxml->z($fooxml->toXML())
But your way is a good idea, may be I'll implement this feature in the next version.
Thanks