XML(Extensible Markup Language)
XMLは、ユーザー定義タグを使用した構造化データ用の柔軟なマークアップ言語です。設定ファイル、データフィード(RSS、Atom)、オフィス文書フォーマット(DOCX、ODT)、エンタープライズデータ交換(SOAP、SVG、XHTML)で広く使用されています。
MIMEタイプ
application/xml
種類
テキスト
圧縮
無劣化
メリット
- + Self-describing with user-defined tags and schemas
- + Mature ecosystem: XPath, XSLT, XSD, SAX/DOM parsers
- + Standard for RSS/Atom feeds, SVG, XHTML, and SOAP
- + Supports namespaces for mixing vocabularies
デメリット
- − Verbose syntax compared to JSON or YAML
- − Parsing is slower and more memory-intensive than JSON
- − Largely replaced by JSON for web APIs
.XMLを使うタイミング
ドキュメントマークアップ、バリデーションスキーマが必要な設定ファイル、SOAPサービス、レガシーなエンタープライズ統合にXMLを使用してください。
技術的詳細
XMLドキュメントは、開始タグと終了タグ、属性、テキストコンテンツを持つ要素のツリー構造です。スキーマ(XSD、DTD、RELAX NG)が構造を検証し、XSLTがXMLを他のフォーマットに変換します。
歴史
W3Cは1998年にSGMLの簡略版としてXML 1.0を公開しました。2000年代にはSOAPウェブサービス、RSSフィード、オフィス文書フォーマットの基盤として、エンタープライズデータ交換のバックボーンとなりました。
.XMLから変換
.XMLに変換
関連フォーマット
関連用語
Learn More
File Format Conversion: A Complete Guide
Converting files between formats is a daily task for professionals across every industry. This comprehensive guide covers document, image, audio, …
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
Meta Tags for SEO: Title, Description, and Open Graph
Meta tags control how your pages appear in search results and social media shares. This guide covers the essential meta …
Text Encoding Explained: UTF-8, ASCII, and Beyond
Text encoding determines how characters are stored as bytes. Understanding UTF-8, ASCII, and other encodings prevents garbled text, mojibake, and …
CSV vs JSON vs XML: Data Exchange Formats Compared
Data exchange formats serve different needs. CSV excels at tabular data, JSON dominates web APIs, and XML powers enterprise integrations. …
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to …