XML to JSON Converter
Parse XML into JSON with attribute preservation (@attr) and text nodes (#text). Great for inspecting SOAP responses, RSS feeds, sitemaps, and legacy XML APIs.
Tóm tắt công cụ
Công cụ này nhận đầu vào có cấu trúc và trả về đầu ra xác định ngay trong trình duyệt, không tải lên máy chủ.
- Tên công cụ
- XML to JSON Converter
- Mục đích đầu vào
- Cung cấp nội dung nguồn để biến đổi, xác thực hoặc phân tích.
- Mục đích đầu ra
- Nhận đầu ra chuẩn hóa thuận tiện để sao chép, tái sử dụng hoặc gỡ lỗi.
- Đầu vào ví dụ
- <book><title>Dune</title><author>Frank Herbert</author><year>1965</year></book>
- Đầu ra ví dụ
- { "book": { "title": "Dune", "author": "Frank Herbert", "year": "1965" } }
Paste XML above and click Convert to JSON.
Giới thiệu công cụ
Parse XML into JSON with attribute preservation (@attr) and text nodes (#text). Great for inspecting SOAP responses, RSS feeds, sitemaps, and legacy XML APIs.
Tổng quan công cụ
The parser reads elements, attributes, text content, and CDATA sections, ignoring XML declarations and comments. Repeated siblings with the same tag name are grouped into a JSON array. Attributes are prefixed with @ and mixed text with #text, so the structure round-trips sensibly. Turn attribute preservation off if you only care about the text content.
Trường hợp sử dụng
- Inspect a SOAP response inline without a debugger
- Convert an RSS feed into JSON for your news reader
- Migrate legacy XML fixtures to JSON-based tests
- Pipe an XML sitemap into a URL-auditing script
Ví dụ đầu vào/đầu ra
<book><title>Dune</title><author>Frank Herbert</author><year>1965</year></book>
{
"book": {
"title": "Dune",
"author": "Frank Herbert",
"year": "1965"
}
}<book id="42" isbn="0441013597"><title>Dune</title></book>
{
"book": {
"@id": "42",
"@isbn": "0441013597",
"title": "Dune"
}
}<rss version="2.0"><channel><item><title>Hello</title></item><item><title>World</title></item></channel></rss>
{
"rss": {
"@version": "2.0",
"channel": {
"item": [
{ "title": "Hello" },
{ "title": "World" }
]
}
}
}Câu hỏi thường gặp
Is this XML to JSON converter free?+
What are @ and # prefixes in the output?+
What XML features are supported?+
How are repeated tags handled?+
Can it parse SOAP, RSS, or sitemap XML?+
Khám phá thêm công cụ
Khám phá các tiện ích liên quan trong danh mục Dữ liệu bên dưới.
Công cụ liên quan
Tiện ích được tuyển chọn có thể hữu ích cho bạn