Elysia Tools

在一个清晰的工作台里浏览工具、案例、可视化和主题指南。

热门分类

专题

语言
ZHESPTRUFRDEEN

Elysia Tools

导航

数据格式

XML 示例

XML(可扩展标记语言)格式示例,从简单到复杂结构

案例

这个案例集合中的条目

文本简单

简单图书信息

基本的图书 XML 结构

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<book>
  <title>Introduction to Programming</title>
  <author>John Smith</author>
  <isbn>978-3-16-148410-0</isbn>
  <publisher>Tech Books</publisher>
  <year>2024</year>
  <price currency="USD">29.99</price>
  <categories>
    <category>Programming</category>
    <category>Technology</category>
  </categories>
</book>
文本中等

客户数据

包含客户信息的 XML 结构

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<customer id="CUST12345">
  <personal>
    <first_name>Jane</first_name>
    <last_name>Johnson</last_name>
    <birth_date>1990-05-15</birth_date>
    <gender>F</gender>
  </personal>

  <contact>
    <email>jane.johnson@example.com</email>
    <phone>+1-555-0123</phone>
    <mobile>+1-555-0124</mobile>
  </contact>

  <address type="billing">
    <street>123 Main St</street>
    <city>New York</city>
    <state>NY</state>
    <zip>10001</zip>
    <country>USA</country>
  </address>

  <address type="shipping">
    <street>123 Main St</street>
    <city>New York</city>
    <state>NY</state>
    <zip>10001</zip>
    <country>USA</country>
  </address>

  <membership>
    <level>Gold</level>
    <join_date>2020-01-15</join_date>
    <expiry_date>2025-12-31</expiry_date>
    <discount_percentage>15</discount_percentage>
  </membership>
</customer>
文本中等

发票信息

商业发票的 XML 表示

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<invoice>
  <header>
    <invoice_number>INV-2024-001</invoice_number>
    <invoice_date>2024-01-15</invoice_date>
    <due_date>2024-02-14</due_date>
    <status>Paid</status>
  </header>

  <seller>
    <name>Tech Solutions Inc.</name>
    <address>
      <street>456 Business Ave</street>
      <city>San Francisco</city>
      <state>CA</state>
      <zip>94102</zip>
      <country>USA</country>
    </address>
    <tax_id>12-3456789</tax_id>
  </seller>

  <buyer>
    <name>Global Enterprises LLC</name>
    <address>
      <street>789 Corporate Blvd</street>
      <city>Los Angeles</city>
      <state>CA</state>
      <zip>90001</zip>
      <country>USA</country>
    </address>
    <tax_id>98-7654321</tax_id>
  </buyer>

  <items>
    <item id="1">
      <description>Laptop Computer</description>
      <quantity>2</quantity>
      <unit_price currency="USD">899.99</unit_price>
      <total currency="USD">1799.98</total>
    </item>
    <item id="2">
      <description>Office Chair</description>
      <quantity>4</quantity>
      <unit_price currency="USD">149.99</unit_price>
      <total currency="USD">599.96</total>
    </item>
    <item id="3">
      <description>Desk Lamp</description>
      <quantity>2</quantity>
      <unit_price currency="USD">49.99</unit_price>
      <total currency="USD">99.98</total>
    </item>
  </items>

  <summary>
    <subtotal currency="USD">2499.92</subtotal>
    <tax_rate>8.5</tax_rate>
    <tax_amount currency="USD">212.49</tax_amount>
    <total currency="USD">2712.41</total>
  </summary>
</invoice>
文本中等

Web 配置文件

Web 应用程序配置

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appSettings>
    <add key="AppName" value="MyWebApplication" />
    <add key="Version" value="1.0.0" />
    <add key="Environment" value="Production" />
  </appSettings>

  <connectionStrings>
    <add name="DefaultConnection"
         connectionString="Server=localhost;Database=myapp;User Id=user;Password=password;"
         providerName="System.Data.SqlClient" />
    <add name="RedisConnection"
         connectionString="localhost:6379"
         providerName="Redis" />
  </connectionStrings>

  <system.web>
    <compilation debug="false" targetFramework="4.8" />
    <httpRuntime targetFramework="4.8" />
    <sessionState mode="InProc" timeout="30" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
    <authorization>
      <deny users="?" />
    </authorization>
  </system.web>

  <system.webServer>
    <modules>
      <remove name="FormsAuthentication" />
      <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
    </modules>
    <staticContent>
      <mimeMap fileExtension=".json" mimeType="application/json" />
      <mimeMap fileExtension=".woff" mimeType="font/woff" />
      <mimeMap fileExtension=".woff2" mimeType="font/woff2" />
    </staticContent>
    <httpCompression>
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
      <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
      </dynamicTypes>
      <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
      </staticTypes>
    </httpCompression>
  </system.webServer>
</configuration>
文本中等

RSS 订阅源

RSS feed 格式示例

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Tech News Daily</title>
    <link>https://example.com</link>
    <description>Latest technology news and updates</description>
    <language>en-us</language>
    <copyright>Copyright 2024 Tech News</copyright>
    <managingEditor>editor@example.com (Editor)</managingEditor>
    <webMaster>webmaster@example.com (Webmaster)</webMaster>
    <pubDate>Mon, 15 Jan 2024 12:00:00 GMT</pubDate>
    <lastBuildDate>Mon, 15 Jan 2024 12:00:00 GMT</lastBuildDate>
    <category>Technology</category>
    <generator>Tech News Generator 1.0</generator>
    <docs>https://www.rssboard.org/rss-specification</docs>
    <cloud domain="rpc.example.com" port="80" path="/RPC2" registerProcedure="ping" protocol="soap"/>
    <ttl>60</ttl>

    <item>
      <title>New AI Technology Breakthrough</title>
      <link>https://example.com/articles/ai-breakthrough</link>
      <description>Scientists announce a major breakthrough in artificial intelligence technology that could revolutionize computing.</description>
      <author>john.smith@example.com (John Smith)</author>
      <category>AI</category>
      <category>Research</category>
      <comments>https://example.com/articles/ai-breakthrough/comments</comments>
      <enclosure url="https://example.com/audio/ai-interview.mp3" type="audio/mpeg" length="1234567"/>
      <guid isPermaLink="true">https://example.com/articles/ai-breakthrough</guid>
      <pubDate>Mon, 15 Jan 2024 10:30:00 GMT</pubDate>
      <source url="https://source.example.com/rss">AI Research Journal</source>
    </item>

    <item>
      <title>Cloud Computing Trends for 2024</title>
      <link>https://example.com/articles/cloud-trends-2024</link>
      <description>Industry experts share their predictions for cloud computing trends in 2024, including edge computing and serverless architectures.</description>
      <author>jane.doe@example.com (Jane Doe)</author>
      <category>Cloud Computing</category>
      <category>Industry Trends</category>
      <guid isPermaLink="true">https://example.com/articles/cloud-trends-2024</guid>
      <pubDate>Sun, 14 Jan 2024 15:45:00 GMT</pubDate>
    </item>

    <item>
      <title>Web Development Best Practices</title>
      <link>https://example.com/articles/web-dev-best-practices</link>
      <description>Comprehensive guide to modern web development best practices, including performance optimization and security measures.</description>
      <author>developer@example.com (Senior Developer)</author>
      <category>Web Development</category>
      <category>Tutorial</category>
      <guid isPermaLink="true">https://example.com/articles/web-dev-best-practices</guid>
      <pubDate>Sat, 13 Jan 2024 09:15:00 GMT</pubDate>
    </item>
  </channel>
</rss>
文本中等

网站地图

搜索引擎网站地图

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">

  <url>
    <loc>https://example.com/</loc>
    <lastmod>2024-01-15T10:00:00+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
  </url>

  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2024-01-10T15:30:00+00:00</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>

  <url>
    <loc>https://example.com/products</loc>
    <lastmod>2024-01-14T12:00:00+00:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.9</priority>
    <image:image>
      <image:loc>https://example.com/images/products-main.jpg</image:loc>
      <image:title>Our Product Line</image:title>
      <image:caption>High-quality products for your business</image:caption>
    </image:image>
  </url>

  <url>
    <loc>https://example.com/blog/new-ai-technology</loc>
    <lastmod>2024-01-15T10:30:00+00:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
    <news:news>
      <news:publication>
        <news:name>Tech Blog</news:name>
        <news:language>en</news:language>
      </news:publication>
      <news:publication_date>2024-01-15T10:30:00+00:00</news:publication_date>
      <news:title>New AI Technology Breakthrough</news:title>
    </news:news>
    <image:image>
      <image:loc>https://example.com/images/ai-technology.jpg</image:loc>
      <image:title>AI Technology</image:title>
    </image:image>
  </url>

  <url>
    <loc>https://example.com/products/laptop-pro</loc>
    <lastmod>2024-01-12T09:15:00+00:00</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    <image:image>
      <image:loc>https://example.com/images/laptop-pro-front.jpg</image:loc>
      <image:title>Laptop Pro - Front View</image:title>
    </image:image>
    <image:image>
      <image:loc>https://example.com/images/laptop-pro-side.jpg</image:loc>
      <image:title>Laptop Pro - Side View</image:title>
    </image:image>
  </url>

  <url>
    <loc>https://example.com/video/product-demo</loc>
    <lastmod>2024-01-11T14:20:00+00:00</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.6</priority>
    <video:video>
      <video:thumbnail_loc>https://example.com/thumbnails/product-demo.jpg</video:thumbnail_loc>
      <video:title>Product Demo Video</video:title>
      <video:description>See our product in action</video:description>
      <video:content_loc>https://example.com/videos/product-demo.mp4</video:content_loc>
      <video:duration>180</video:duration>
      <video:publication_date>2024-01-11T14:20:00+00:00</video:publication_date>
    </video:video>
  </url>

  <url>
    <loc>https://example.com/contact</loc>
    <lastmod>2024-01-05T11:00:00+00:00</lastmod>
    <changefreq>yearly</changefreq>
    <priority>0.5</priority>
  </url>
</urlset>
文本复杂

SOAP 请求

Web 服务 SOAP 请求示例

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <AuthenticationHeader xmlns="http://example.com/auth">
      <Username>john.doe</Username>
      <Password>secure_password_123</Password>
      <ApiKey>abc123def456</ApiKey>
    </AuthenticationHeader>
  </soap:Header>

  <soap:Body>
    <GetCustomerDetails xmlns="http://example.com/customers">
      <customerRequest>
        <CustomerId>CUST12345</CustomerId>
        <includeOrders>true</includeOrders>
        <includePaymentHistory>true</includePaymentHistory>
        <dateRange>
          <startDate>2024-01-01</startDate>
          <endDate>2024-01-31</endDate>
        </dateRange>
      </customerRequest>
    </GetCustomerDetails>
  </soap:Body>
</soap:Envelope>
文本复杂

SVG 图形

可缩放矢量图形 XML

plaintext
<?xml version="1.0" encoding="UTF-8"?>
<svg width="400" height="300" xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">

  <!-- Definitions for gradients and patterns -->
  <defs>
    <linearGradient id="skyGradient" x1="0%" y1="0%" x2="0%" y2="100%">
      <stop offset="0%" style="stop-color:#87CEEB;stop-opacity:1" />
      <stop offset="100%" style="stop-color:#E0F6FF;stop-opacity:1" />
    </linearGradient>

    <linearGradient id="sunGradient" x1="0%" y1="0%" x2="100%" y2="100%">
      <stop offset="0%" style="stop-color:#FFD700;stop-opacity:1" />
      <stop offset="100%" style="stop-color:#FFA500;stop-opacity:1" />
    </linearGradient>

    <pattern id="grassPattern" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse">
      <rect x="0" y="0" width="10" height="3" fill="#90EE90"/>
      <rect x="0" y="3" width="10" height="7" fill="#228B22"/>
    </pattern>
  </defs>

  <!-- Background sky -->
  <rect width="400" height="200" fill="url(#skyGradient)"/>

  <!-- Ground -->
  <rect y="200" width="400" height="100" fill="url(#grassPattern)"/>

  <!-- Sun -->
  <circle cx="350" cy="50" r="30" fill="url(#sunGradient)">
    <animate attributeName="r" values="30;32;30" dur="3s" repeatCount="indefinite"/>
  </circle>

  <!-- Clouds -->
  <g opacity="0.8">
    <ellipse cx="80" cy="60" rx="30" ry="20" fill="white"/>
    <ellipse cx="100" cy="55" rx="35" ry="25" fill="white"/>
    <ellipse cx="120" cy="60" rx="30" ry="20" fill="white"/>
    <animateTransform attributeName="transform" type="translate"
                      values="0,0;50,0;0,0" dur="20s" repeatCount="indefinite"/>
  </g>

  <!-- House -->
  <g>
    <!-- House base -->
    <rect x="150" y="140" width="100" height="80" fill="#CD853F" stroke="#8B4513" stroke-width="2"/>

    <!-- Roof -->
    <polygon points="140,140 200,100 260,140" fill="#8B4513" stroke="#654321" stroke-width="2"/>

    <!-- Door -->
    <rect x="185" y="170" width="30" height="50" fill="#654321"/>
    <circle cx="210" cy="195" r="2" fill="#FFD700"/>

    <!-- Windows -->
    <rect x="160" y="155" width="20" height="20" fill="#87CEEB" stroke="#654321" stroke-width="2"/>
    <rect x="220" y="155" width="20" height="20" fill="#87CEEB" stroke="#654321" stroke-width="2"/>

    <!-- Chimney -->
    <rect x="210" y="110" width="15" height="25" fill="#8B4513"/>
  </g>

  <!-- Tree -->
  <g>
    <rect x="50" y="170" width="20" height="50" fill="#8B4513"/>
    <circle cx="60" cy="150" r="25" fill="#228B22"/>
    <circle cx="45" cy="160" r="20" fill="#32CD32"/>
    <circle cx="75" cy="160" r="20" fill="#32CD32"/>
  </g>

  <!-- Flowers -->
  <g>
    <circle cx="30" cy="210" r="5" fill="#FF69B4"/>
    <circle cx="80" cy="205" r="4" fill="#FFD700"/>
    <circle cx="320" cy="210" r="5" fill="#FF6347"/>
    <circle cx="350" cy="205" r="4" fill="#9370DB"/>
  </g>

  <!-- Text label -->
  <text x="200" y="290" text-anchor="middle" font-family="Arial, sans-serif"
        font-size="16" fill="#333">Beautiful Day</text>
</svg>

工具

经常与该案例搭配使用的工具

相关内容

相关案例集合

相关内容

相关专题

工具使用指南

帮助搜索与理解工作流的案例说明

标题

XML 示例

描述

XML(可扩展标记语言)格式示例,从简单到复杂结构

概览

XML(可扩展标记语言)格式示例,从简单到复杂结构

适用场景

  • Use this sample set when you want reference inputs for XML 示例.
  • Use it to preview output formats and compare related sample variants.

使用方式

  1. 1Open a sample entry to inspect the prepared example payload or asset.
  2. 2Compare it with related tools to understand how the workflow connects.

常见用途

  • 简单图书信息
  • 客户数据
  • 发票信息
  • Web 配置文件
  • RSS 订阅源
  • 网站地图

常见问题

What is included in XML 示例?

This page includes curated sample entries, related tools, and neighboring sample collections for XML 示例.

专题

XML 转换、映射与 XPath 交付工作流

在 XML、CSV、Excel、JSON 和文本之间转换结构化数据,合并兼容的 XML 文档,提取指定路径,并在交付前验证结果。

专题

表格数据格式转换工作流

在 CSV、电子表格、JSON、HTML 表格、Markdown、XML 和文本之间转换,同时检查表头、分隔符、类型与编码。

专题

药代动力学教学模型与结果核查

用于教学或 QA 的药代公式、模型假设和结果一致性核查,不提供用药剂量、诊断或临床建议。

专题

PDF 转 Office、网页、电子书与结构化格式

把 PDF 转成 Word、Excel、PowerPoint、HTML、EPUB、图片、文本和 XML,并用清晰流程选择合适输出。

首页
工具3201
案例593
可视化465
文件查看器103
专题233
标签333
图像、音频与视频657

图像、音频、视频处理、转换与优化工具

数学、日期与金融644

计算器、数值计算、日期逻辑、统计与金融工具

设计与颜色297

颜色、版式、图形、视觉样式与设计辅助工具

文本与写作209

写作、清洗、格式化、提取与文本分析工具

开发与 Web193

开发者工具、网络处理、Web 调试与自动化辅助工具

转换与编码175

格式、文件、压缩包、单位与编码转换工具

FLAC/WAV 无损音源疑点筛查与证据交付
自托管抽奖组件配置复核、嵌入测试与上线交付
Stripe 优惠码候选批次审核与本地导入预检
批量照片技术初筛、近重复复核与修图候选交付
界面截图结构化、人工校对与开发交付

© 2026 Elysia Tools. 保留所有权利。

文档价格关于我们服务条款隐私政策Cookie 政策联系我们

Media

SVG转JPG转换器

将SVG矢量图形转换为JPG光栅格式,支持自定义分辨率、质量和背景选项

Media

SVG转PNG转换器

将SVG矢量图形转换为PNG光栅格式,支持自定义分辨率、质量和透明度选项

Media

SVG转WebP转换器

将SVG矢量图形转换为WebP光栅格式,支持现代压缩和透明度

Design

艺术二维码:样式化模块与 Logo 嵌入生成器

生成品牌色、渐变、圆角/圆点模块与中央 Logo 的艺术二维码,附 ISO 掩码惩罚分解、逐模块元数据导出与里德–所罗门擦除预算判定。

Media

SVG 精简与分析工具

分析 SVG 标记,移除冗余元素,缩小体积,直观看到前后差异,并导出清理后的文件

Media

SVG Favicon 生成器

将 SVG 或位图 Logo 生成完整的 favicon 套件,包括 ICO、多个 PNG 尺寸、Apple Touch Icon 和 site.webmanifest

Media

SVG Sprite Sheet 生成器

上传最多 30 个 SVG 图标,合并为单个 sprite sheet:<symbol> 模式用于页面内联 <use>,<view> 模式用于外部文件片段引用。自动补全 viewBox(由 width/height 推导)、去除重复图标、可选剥离 fill/stroke 以配合 currentColor、始终清理 <script> 与 on* 事件属性,并生成 HTML / React / Vue / CSS 使用代码片段与每个图标的实时预览。

Media

SVG转PDF

将 SVG 矢量图形转换为 PDF 文档,用于打印和共享

开发

XML 查看器样本

用于浏览器内 XML 查看器的样本文件

媒体

SVG示例

可缩放矢量图形(SVG)示例,展示各种SVG功能和技术

媒体

SVG 查看器样本

用于浏览器内 SVG 查看器的样本矢量图

Java

Android Java 序列化示例

Android Java 序列化示例,包括JSON序列化、反序列化和XML解析

Kotlin

Android Kotlin 序列化示例

Android Kotlin 序列化示例,包括JSON序列化、反序列化和XML解析

Python

Web Python 数据序列化示例

Web Python 数据序列化示例,包括JSON和XML处理