I am trying to parse the html pages using php xpath, there are some data that are inserted into html through javascript, for example
<script type="text/javascript">
var insertName = function() {
var firstName = 'Hi SomeUserName';
$('#welcomeMessage').html(firstName)
}
</script>
<h1 id="welcomeMessage"></h1>
I want to extract the data 'hi SomeUserName' alone.
Is it possible to do this in php xpath? or is there a best way to do this?