Coding

Generate XPath Expressions for Article Elements

Create and verify XPath expressions that locate an article’s title, publication time, and content, and return the results in a table.

Single prompt 1 variables English

Prompt template

Use this prompt.

01
Act as a senior XPath engineer. For the article at url, provide XPath expressions for its title, publication time, and content in a table with columns for field, XPath expression, and XPath match results. Omit match results for the content field. Each XPath expression must start with a dot and match exactly one element. Verify that each expression works. Prefer contains() with the class attribute; do not use contains() with text(). Do not explain; output only the results table.

Prompt library

Use these prompts directly inside ChatGPT.

Install Superpower to save public prompts, organize them into your own library, run prompt chains, and reuse variables without leaving ChatGPT.