{"action":"created","issue":{"url":"https://api.github.com/repos/brunato/xmlschema/issues/77","repository_url":"https://api.github.com/repos/brunato/xmlschema","labels_url":"https://api.github.com/repos/brunato/xmlschema/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/brunato/xmlschema/issues/77/comments","events_url":"https://api.github.com/repos/brunato/xmlschema/issues/77/events","html_url":"https://github.com/brunato/xmlschema/issues/77","id":354667265,"node_id":"MDU6SXNzdWUzNTQ2NjcyNjU=","number":77,"title":"Can't parse document without namespace","user":{"login":"gdetrez","id":38019,"node_id":"MDQ6VXNlcjM4MDE5","avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-28T10:26:57Z","updated_at":"2018-09-23T09:50:48Z","closed_at":"2018-09-23T09:50:48Z","author_association":"NONE","body":"I'm not sure if this is an issue or if I just didn't find the proper way to use the library.\r\n\r\nI would like to parse XML documents for which I have an XSD schema. Some document have an `xmlns` attribute in the root tag and I can use `to_dict` without issue:\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<foo xmlns=\"http://example.com/foo\">bar</foo>\r\n```\r\n```python\r\n>>> schema.to_dict('./foo.xml') \r\n'bar'\r\n```\r\n\r\nOther however come without the `xmlns` attribute:\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<foo>bar</foo>\r\n```\r\nI thought I would be able to parse those anyway by passing `namespaces` to `to_dict` but that doesn't seem to be the case:\r\n\r\n```python\r\n>>> schema.to_dict('./foo-noxmlns.xml', namespaces={'': 'http://example.com/foo'})\r\n[...]\r\nReason: 'foo' is not a global element of the schema!\r\n\r\nInstance:\r\n\r\n  <foo>bar</foo>\r\n```\r\nI also tried to give the namespaced tag name as `path` but I get a different error:\r\n\r\n```python\r\n>>> schema.to_dict('./foo-noxmlns.xml', path='{http://example.com/foo}foo', namespaces={'': 'http://example.com/foo'})\r\n[...]\r\nElementPathSyntaxError: unexpected symbol '{' at line 1, column 1.\r\n```\r\nFinally, I tried passing `validation='skip'` but then `to_dict` just returns `None`."},"comment":{"url":"https://api.github.com/repos/brunato/xmlschema/issues/comments/423804539","html_url":"https://github.com/brunato/xmlschema/issues/77#issuecomment-423804539","issue_url":"https://api.github.com/repos/brunato/xmlschema/issues/77","id":423804539,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzgwNDUzOQ==","user":{"login":"brunato","id":2034665,"node_id":"MDQ6VXNlcjIwMzQ2NjU=","avatar_url":"https://avatars2.githubusercontent.com/u/2034665?v=4","gravatar_id":"","url":"https://api.github.com/users/brunato","html_url":"https://github.com/brunato","followers_url":"https://api.github.com/users/brunato/followers","following_url":"https://api.github.com/users/brunato/following{/other_user}","gists_url":"https://api.github.com/users/brunato/gists{/gist_id}","starred_url":"https://api.github.com/users/brunato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunato/subscriptions","organizations_url":"https://api.github.com/users/brunato/orgs","repos_url":"https://api.github.com/users/brunato/repos","events_url":"https://api.github.com/users/brunato/events{/privacy}","received_events_url":"https://api.github.com/users/brunato/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T09:50:48Z","updated_at":"2018-09-23T09:50:48Z","author_association":"OWNER","body":"`elementpath>=1.0.12` is now also a requirement of the release 1.0.4 of *xmlschema*."}}
{"actor":{"display_login":"brunato"}}