{"uid":"cap_C1xG1UgQAvMS_7Q5ZnLIs","slug":"agent-data-tools-revmesh2074-workers-dev-xml-to-json-converter-1c134e7c","name":"XML to JSON Converter","description":"XML to JSON for any XML document: attributes become \"@name\" keys, text becomes \"#text\" (or the value itself when an element only holds text), and repeated child elements become arrays. DOCTYPEs and external entities are refused, so nothing outside the document is ever loaded. Up to 100,000 characters. Use to read XML feeds, SOAP responses and config files in an agent.","url":"https://agent-data-tools.revmesh2074.workers.dev/xml/to-json?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["xml"],"properties":{"xml":{"type":"string","description":"The XML document"}}},"responseSchema":{"type":"object","properties":{"json":{"type":"object","properties":{"order":{"type":"object","properties":{"@id":{"type":"string"},"item":{"type":"array","items":{"type":"object","properties":{"@sku":{"type":"string"},"#text":{"type":"string"}}}}}}}},"root":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iFjW2wub1Ez8JSm3mT3od","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"Converts an XML document string to a structured JSON object, mapping attributes to @name keys and text to #text keys, with repeated elements becoming arrays.","exampleAgentPrompt":"Convert this XML into JSON for me: <order id=\"42\"><item sku=\"A1\">Widget</item><item sku=\"B2\">Gadget</item></order> — I need attributes as @id/@sku keys and repeated items as an array.","exampleUseCases":[{"title":"Parse RSS feed into structured data","prompt":"I have an RSS feed in XML format — can you convert it to JSON so I can extract the titles and links from each item? Here's the XML: <rss version=\"2.0\"><channel><title>My Blog</title><item><title>Post 1</title><link>https://example.com/1</link></item><item><title>Post 2</title><link>https://example.com/2</link></item></channel></rss>"},{"title":"Decode SOAP API response","prompt":"I got this SOAP XML response back from a legacy API and I need to work with it as JSON — please convert it: <soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><GetOrderResponse><OrderId>99</OrderId><Status>shipped</Status></GetOrderResponse></soap:Body></soap:Envelope>"},{"title":"Read XML config file as JSON","prompt":"Can you turn this XML config file into a JSON object so I can read the database settings from it? Here's the XML: <config><database host=\"localhost\" port=\"5432\"><name>mydb</name><user>admin</user></database></config>"}],"resultDescription":"Returns a JSON object with a 'json' key containing the parsed structure (attributes as @name keys, text content as #text or the value itself for text-only elements, repeated sibling elements as arrays) and a 'root' key with the root element name.","failureModes":["DOCTYPE declarations in the XML are refused with an error — external entity loading is blocked by design","External entity references (XXE) are rejected for security","Input XML exceeding 100,000 characters is rejected","Malformed or invalid XML returns a parse error","XML with encoding issues or binary content may fail to process"],"whenToPreferThis":"Choose this endpoint when you need a secure, predictable XML-to-JSON conversion with a consistent mapping convention (attributes as @name, text as #text, repeated elements as arrays) and explicit XXE/DOCTYPE protection. Ideal for processing RSS feeds, SOAP responses, and XML config files inside an agent workflow without needing a local XML parser or library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-03T06:40:20.059Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-xml-to-json-converter-1c134e7c"}