Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added XML namespace support #16

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

vpominchuk
Copy link
Contributor

Lot of sitemap files have additional namespaced tags such as imge:image, news:news
This fix added XML namespace support to operate with such tags.

function $parser->getURLs() now returns additional element called namespaces with nested tags:

array:5 [
  "namespaces" => array:1 [
    "news" => array:1 [
      "news" => array:4 [
        "publication" => array:2 [
          "name" => "Some News"
          "language" => "en"
        ]
        "publication_date" => "2022-03-08"
        "title" => "Some title"
        "keywords" => "uk_news"
      ]
    ]
  ]
  "loc" => "https://sample.com/story/story-1.html"
  "lastmod" => null
  "changefreq" => null
  "priority" => null
]

@JanPetterMG JanPetterMG merged commit 688b469 into VIPnytt:master Nov 7, 2022
@JanPetterMG
Copy link
Collaborator

Released as part of version 1.1.6
https://github.com/VIPnytt/SitemapParser/releases/tag/v1.1.6

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants