Retrieving InnerXML in PHP DOM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Sobell

    Retrieving InnerXML in PHP DOM

    Hi,
    I'm trying to return the inner XML from a DOM element, but I can't find
    any methods that allow this.
    For example, if I have a string:
    <TEXT>Here is a string with <B>bold</B> text in it</TEXT>
    then I want to return the enclosed string _including_ the <B> tags:
    "Here is a string with <B>bold</B> text in it"

    Using get_content strips out the tags.
    "Here is a string with bold text in it"

    Does anyone have any suggestions?

    Cheers,
    Jason
Working...