Chuyển tới nội dung chính
Z

What is XML?

XML (eXtensible Markup Language) is a markup language for encoding structured data in a text format using nested, custom tags. It supports attributes, namespaces and schema validation (XSD/DTD), and is used for documents, configuration, web feeds (RSS) and enterprise data exchange.

XML wraps data in nested, self-describing tags you define yourself, with optional attributes on elements and namespaces to avoid name clashes. A schema (XSD or DTD) can enforce structure and types.

Once dominant for web services (SOAP) and data interchange, XML is now common for documents (DOCX, SVG), feeds (RSS/Atom) and configuration. JSON has largely replaced it for web APIs.

XML tools

Câu hỏi thường gặp

Nếu tiêu đề của tôi có khoảng trắng hoặc ký tự đặc biệt thì sao?

Chúng sẽ được thay bằng dấu gạch dưới, vì tên phần tử XML không được chứa các ký tự đó. Tiêu đề bắt đầu bằng chữ số sẽ được thêm tiền tố `_`.

Cần cấu trúc XML khác (dùng thuộc tính thay vì phần tử con)?

Hãy chuyển CSV sang JSON trước bằng <a class="text-brand-600 hover:underline" href="/csv-to-json">CSV to JSON</a>, chỉnh sửa JSON, sau đó dùng <a class="text-brand-600 hover:underline" href="/json-to-xml">JSON to XML</a> với tiền tố thuộc tính (attribute prefix).

Tôi có thể định dạng đẹp (pretty-print) kết quả hơn nữa không?

Kết quả đầu ra đã được thụt lề sẵn. Hãy dùng <a class="text-brand-600 hover:underline" href="/xml-formatter">XML Formatter</a> nếu bạn cần thụt lề khác hoặc muốn rút gọn (minify).