Hello,
 
If I have an XML document such:
 
.
  <para>
    This is some <i>test</i> text.
  </para>
.
 
When I use simplexml_load_string and then do:
 
  print( $obj->para );
 
The result is:
 
  "This is some  text."
 
Note that the embedded <i></i> text is missing.  Internally, the cast is
made using the xmlNodeListGetString function.  Is there any reason that
it makes more sense to do that rather than use the xmlNodeGetContent
function.  The latter function returns the complete text.  I am a newbie
to most of this, so there may be many reasons for the choice.
 
If the former method is preferred, would it be possible to add another
method for retrieving the text of a node using the xmlNodeGetContent
function.  I have added such a method to my beta 3 installation called
toString() and it works fine.  I would probably rename it for general
redistribution.
 
Thanks in advance!
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blake Schwendiman
Software Development

:: http://www.lulu.com/intechrabooks 
:: In-depth software development books priced right
  
 

Reply via email to