Kategorien

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-Dokumentation

Request-Endpunkt

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

Request-Parameter

Parameter-Name Typ Erforderlich Beschreibung
xmlInput textarea Ja -
xpathExpressions textarea Nein 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 Ja -
includePaths checkbox Nein Include the XPath expression used for each extraction
includeAttributes checkbox Nein Include attributes for extracted elements
flattenArrays checkbox Nein Treat multiple results as individual items instead of arrays
preserveOrder checkbox Nein Maintain the original order of elements in the XML document
namespaceAware checkbox Nein Enable namespace-aware XPath evaluation
nullValues checkbox Nein Include empty elements and null values in the extraction results

Antwortformat

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

MCP-Dokumentation

Fügen Sie dieses Tool zu Ihrer MCP-Server-Konfiguration hinzu:

{
  "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"
    }
  }
}

Sie können mehrere Tools verketten, z.B.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, maximal 20 Tools.

Wenn Sie auf Probleme stoßen, kontaktieren Sie uns bitte bei [email protected]