Skip to content
Novus Examples
xml1.8 KB

Sitemap with the video extension

A sitemap using the video extension namespace: one fully populated entry with duration, rating, view count, country restriction and tags, and one minimal entry with only the required children plus a player attribute. For testing video-sitemap parsers and their attribute handling.

Preview — first 37 linesxml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
  <url>
    <loc>https://www.example.com/watch/fitting-guide</loc>
    <video:video>
      <video:thumbnail_loc>https://cdn.example.net/vid/fitting-guide.jpg</video:thumbnail_loc>
      <video:title>How to fit a trail boot</video:title>
      <video:description>A sample two-minute fitting guide. Fictional content.</video:description>
      <video:content_loc>https://cdn.example.net/vid/fitting-guide.mp4</video:content_loc>
      <video:player_loc>https://www.example.com/player?v=fitting-guide</video:player_loc>
      <video:duration>132</video:duration>
      <video:expiration_date>2027-01-01T00:00:00+00:00</video:expiration_date>
      <video:rating>4.4</video:rating>
      <video:view_count>18420</video:view_count>
      <video:publication_date>2026-01-01T00:00:00+00:00</video:publication_date>
      <video:family_friendly>yes</video:family_friendly>
      <video:restriction relationship="allow">GB IE FR DE</video:restriction>
      <video:requires_subscription>no</video:requires_subscription>
      <video:live>no</video:live>
      <video:tag>fitting</video:tag>
      <video:tag>boots</video:tag>
    </video:video>
  </url>
  <url>
    <loc>https://www.example.com/watch/care-and-repair</loc>
    <video:video>
      <video:thumbnail_loc>https://cdn.example.net/vid/care.jpg</video:thumbnail_loc>
      <video:title>Care and repair basics</video:title>
      <video:description>A sample maintenance clip. Fictional content.</video:description>
      <video:player_loc allow_embed="yes">https://www.example.com/player?v=care</video:player_loc>
      <video:duration>95</video:duration>
      <video:live>no</video:live>
    </video:video>
  </url>
</urlset>

Specifications

Seed
70400
Site
example.com (fictional)
Format
urlset + video 1.1
Urls
2
Videos
2
Child Elements
content_loc, player_loc, duration, rating, restriction

Testing contract

Expected to pass
Scenario
Parse both video entries, including element attributes.
Expected result
The first video returns duration 132, rating 4.4, an allow-list restriction of GB IE FR DE and two tags; the second returns allow_embed="yes" from the player_loc attribute and no content_loc.

What is a .xml file?

XML (Extensible Markup Language) is a verbose, self-describing markup language using nested tags, attributes, and namespaces to represent structured, hierarchical data. It supports schemas, entities, and validation and underlies many document and data formats. It remains common in enterprise, publishing, and interchange contexts.

How to use this file

Use an example XML file to test parsers, namespace and schema validation, XPath queries, and protection against entity-expansion and external-entity attacks.

How to use this file for testing

“Sitemap with the video extension” is a deterministic Novus Examples fixture for Web assets, Web scraping, Editor testing. Favicons, web app manifests, service workers, robots and sitemap files, Open Graph images, and .well-known resources — for testing web tooling, crawlers, PWA installers, and asset pipelines.

Documented properties for this file: seed 70400 · urlset + video 1.1. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Web-platform fixtures are standards-compliant samples against fictional example.com data. Test crawlers, PWA installers and manifest validators, favicon/icon pipelines, service-worker registration, or .well-known parsers against the documented structure.

Code examples

import xml.etree.ElementTree as ET

tree = ET.parse("sitemap-video.xml")
root = tree.getroot()
print(root.tag, [c.tag for c in root][:5])

Generated by generation/web_p7.py. Free for any use, no attribution required — license.