Format Conversion
Convert various text formats to XML with customizable structure and formatting options
Rufen Sie dieses Werkzeug aus Ihrem Code in drei Sprachen auf.
curl -X POST 'https://api.elysiatools.com/de/api/tools/text-to-xml' \
-H 'Content-Type: application/json' \
-d '{"textInput":"Enter your text data to convert to XML:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, or other formats...","inputFormat":"auto","rootElement":"root","rowElement":"item","includeDeclaration":true,"includeAttributes":false,"attributeName":"value","cdataSections":false,"escapeSpecialChars":true,"prettyPrint":true,"indentSize":"2","showStats":false}'Senden Sie eine POST-Anfrage mit Ihren Eingaben als JSON. Dateiparameter erfordern einen vorherigen Upload.
POST https://api.elysiatools.com/de/api/tools/text-to-xml| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| textInput | textarea | Ja | — |
| inputFormat | select | Ja | — |
| rootElement | text | Nein | — |
| rowElement | text | Nein | — |
| includeDeclaration | checkbox | Nein | — |
| includeAttributes |
Fügen Sie dieses Werkzeug Ihrem Model-Context-Protocol-Server hinzu, damit KI-Agenten es auflisten und aufrufen können.
Fügen Sie diesen Block Ihrer MCP-Client-Konfiguration hinzu:
{
"mcpServers": {
"elysiatools-text-to-xml": {
"name": "text-to-xml",
"description": "Convert various text formats to XML with customizable structure and formatting options",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=text-to-xml",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Nach dem Verbinden mit dem SSE-Endpunkt listen Sie die bereitgestellten Werkzeuge auf:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Rufen Sie das Werkzeug über seine ID auf; Argumente werden aus seiner Parameterliste gebildet:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "text-to-xml",
"arguments": {
"textInput": "Enter your text data to convert to XML:\nname,age,city\nJohn,25,New York\nJane,30,London\n\nOr paste JSON, key-value pairs, or other formats...",
"inputFormat": "auto",
"rootElement": "root",
"rowElement": "item",
"includeDeclaration": true,
"includeAttributes": false,
"attributeName": "value",
"cdataSections": false,
"escapeSpecialChars": true,
"prettyPrint": true,
"indentSize": "2",
"showStats": false
}
}
}| checkbox |
| Nein |
| — |
| attributeName | text | Nein | — |
| cdataSections | checkbox | Nein | — |
| escapeSpecialChars | checkbox | Nein | — |
| prettyPrint | checkbox | Nein | — |
| indentSize | number | Nein | — |
| showStats | checkbox | Nein | — |
Textergebnis
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Fragen oder Probleme? Kontakt: [email protected]