XML路径提取器
使用XPath表达式从XML文档中提取值。非常适合从复杂的嵌套XML结构、API响应、RSS源和配置文件中提取特定数据。
Documentação da API
Ponto final da solicitação
POST /pt/api/tools/xml-path-extractor
Parâmetros da solicitação
| Nome do parâmetro | Tipo | Requerido | Descrição |
|---|---|---|---|
| xmlInput | textarea | Sim | - |
| xpathExpressions | textarea | Não | 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 | Sim | - |
| includePaths | checkbox | Não | Include the XPath expression used for each extraction |
| includeAttributes | checkbox | Não | Include attributes for extracted elements |
| flattenArrays | checkbox | Não | Treat multiple results as individual items instead of arrays |
| preserveOrder | checkbox | Não | Maintain the original order of elements in the XML document |
| namespaceAware | checkbox | Não | Enable namespace-aware XPath evaluation |
| nullValues | checkbox | Não | Include empty elements and null values in the extraction results |
Formato de resposta
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}
Texto:
Texto
Documentação de MCP
Adicione este ferramenta à sua configuração de servidor 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"
}
}
}
Você pode encadear várias ferramentas, ex: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, máx 20 ferramentas.
Se você encontrar algum problema, por favor, entre em contato conosco em [email protected]