#16 text inside element

Next_Release
pending
nobody
None
5
2012-10-18
2009-07-10
Anonymous
No

Hi,

Thanks a lot for this wonderful DOM. I like it very much, it's a great job you have done here.

I have a future request. I am wondering, why aren't text's inside an element, taken as an element. Yes, i can find all text's with find() function, but it would be great, if text's inside element would be taken as an element.

I don't know how XML standards dictate with text inside an element, it is very likely that they doesn't allow this, but it would be really great.

You can contact me on dejankropec@gmail.com.

Keep up good work, regards,
Dejan

Discussion

  • John Schlick
    John Schlick
    2012-10-18

    Please provide an example of the syntax you are looking for since I think text in an element Is taken as an element.

    $dom->plaintext gives you the text inside of an element.
    the same way that $dom->src gives you the src attribute of an element.

    find(div[text*=hi]
    will find a div with the text hi in it somewhere...

    I don't understand what you are looking for. What is it that you can't do?

    As a note: I'll leave this open for a couple months, and if there is no feedback on it, I'll close it.

     
    Last edit: John Schlick 2012-10-18
  • John Schlick
    John Schlick
    2012-10-18

    • status: open --> pending