Категории

XML路径提取器

使用XPath表达式从XML文档中提取值。非常适合从复杂的嵌套XML结构、API响应、RSS源和配置文件中提取特定数据。

XPath expressions to extract values. Examples: //* - All elements //book/title - All book titles //person[@age>18] - Persons older than 18 Leave empty to extract all elements

Include the XPath expression used for each extraction

Include attributes for extracted elements

Treat multiple results as individual items instead of arrays

Maintain the original order of elements in the XML document

Enable namespace-aware XPath evaluation

Include empty elements and null values in the extraction results

Документация API

Конечная точка запроса

POST /ru/api/tools/xml-path-extractor

Параметры запроса

Имя параметра Тип Обязательно Описание
xmlInput textarea Да -
xpathExpressions textarea Нет XPath expressions to extract values. Examples: //* - All elements //book/title - All book titles //person[@age>18] - Persons older than 18 Leave empty to extract all elements
outputFormat select Да -
includePaths checkbox Нет Include the XPath expression used for each extraction
includeAttributes checkbox Нет Include attributes for extracted elements
flattenArrays checkbox Нет Treat multiple results as individual items instead of arrays
preserveOrder checkbox Нет Maintain the original order of elements in the XML document
namespaceAware checkbox Нет Enable namespace-aware XPath evaluation
nullValues checkbox Нет Include empty elements and null values in the extraction results

Формат ответа

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Текст: Текст

Документация MCP

Добавьте этот инструмент к конфигурации сервера MCP:

{
  "mcpServers": {
    "elysiatools-xml-path-extractor": {
      "name": "xml-path-extractor",
      "description": "使用XPath表达式从XML文档中提取值。非常适合从复杂的嵌套XML结构、API响应、RSS源和配置文件中提取特定数据。",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xml-path-extractor",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

Вы можете объединять несколько инструментов, например: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, максимум 20 инструментов.

Если вы столкнулись с проблемами, пожалуйста, свяжитесь с нами по адресу [email protected]