Skip to content

usage of near child (> operator) not working #102

@scorninpc

Description

@scorninpc

What is this feature about (expected vs actual behaviour)?

When find for > span for example, throw a error Expected selector, but " at 0> found.

In the code above, first echo show real 29.30 nodes fine, but second one need to return just 29.30

How can I reproduce it?

$find = (new \voku\helper\HtmlDomParser())->loadHtml(<<<EOD
	<html>
		<body>
			<div class="card-action-item"></div>
			<div class="card-action-item">
				real <span>29.30</span> <span> nodes</span>
			</div>
		</body>
	</html>
EOD);

$find = $find->find(".card-action-item:nth-child(2)", 0);
$all = $find->text;
echo $all . "\n";

$find = $find->find("> span");
$just_value = $find->text;
echo $just_value . "\n";

Any additional information?

I have tested on another languages, and this may be a valid selector. am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions