Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All text nodes which are not an element nodes #45

Open
GoogleCodeExporter opened this issue Mar 19, 2015 · 1 comment
Open

All text nodes which are not an element nodes #45

GoogleCodeExporter opened this issue Mar 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

How I can find all text nodes which are not an element nodes?

For example: 
I have this text.
<strong>Hallo!</strong> What <strong>are</strong> <strong>you doing</strong>?

And I want find only words "What" and "?". Is it possible?

Original issue reported on code.google.com by [email protected] on 1 Aug 2013 at 2:09

@strarsis
Copy link

strarsis commented Mar 22, 2018

Edit: For inserting a text node you can re-use the code in the addText method, replacing $this with the parent element and addChild with insertChild (the other methods expect the offset passed by reference).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants