Clodan 0 Newbie Poster

Hi guys,

well my question is the following:

I am using XPATH in php. Let me say I have the following in a HTML file:
<p>This part I want but not this part</p>

I want to have the text "This part I want". I did research and have the following XPATh-rule:
//html/body//*[substring-before(.,'but not this part')]

My result is that I every time get the text: This part I want but not this part.

Does anyone know why? I don't get it. How can I have the text which I want?

Regards, Clodan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.