Answer the question
In order to leave comments, you need to log in
XPath: How to find a node followed by an empty string?
Hello!
You need to iterate over all nodes followed by an empty string or a string with whitespace characters.
I'm looking like this:
if( preg_match( '/^[\s\S]+$\r?\n[\s]+/miu', $element->c14n() ) ) {
echo $element->c14n() . PHP_EOL;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question