Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ArrayOfUrl instead of urlset? #12

Closed
pboisso opened this issue Jul 25, 2018 · 4 comments
Closed

ArrayOfUrl instead of urlset? #12

pboisso opened this issue Jul 25, 2018 · 4 comments

Comments

@pboisso
Copy link

pboisso commented Jul 25, 2018

Hi,

For some reason, when generating sitemaps, the list of url is getting out as

<ArrayOfUrl xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <url> ...

instead of
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> ...

Any idea why?

Got the nuget 2.0.5 version.

Thanks.

@VagyokC4
Copy link

@ernado-x Has or is this issue being addressed?

@atrevido
Copy link
Contributor

atrevido commented Aug 28, 2018

There is a bug in ISitemapGenerator (SitemapGenerator.cs)

It uses incorrect serializer

_serializedXmlSaver = new SerializedXmlSaver<List<Url>>(new FileSystemWrapper());

instead of

_serializedXmlSaver = new SerializedXmlSaver<Sitemap>(new FileSystemWrapper());

@atrevido
Copy link
Contributor

And as i can see it works so only if you use generator with sitemap index. In case of a simple sitemap it's ok

@tsteele
Copy link

tsteele commented Sep 26, 2018

I updated my fork with the change , but it still generating ArrayOfUrl in the xml. Even running the unit test generates files with ArrayOfUrl .

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

No branches or pull requests

5 participants