-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Empty namespace #1087
Comments
<?xml version="1.0" encoding="utf-8"?>
<A xmlns="http://namespace.org/ns">
<B xmlns="">text</B>
</A> OR <?xml version="1.0" encoding="utf-8"?>
<x:A xmlns="http://namespace.org/ns" y:xmlns="">
<y:B>text</y:B>
</x:A> OR <?xml version="1.0" encoding="utf-8"?>
<x:A x:xmlns="http://namespace.org/ns">
<B>text</B>
</x:A> Are all equivalent. The result depends on your XML mapping info in the entity. Can you share those info please? |
In class B I haven't annotations.
this condition evaluates to false and hovewer, also changing that to $metadata->xmlNamespace !== null, children method does not return nodes. I also noticed that getDocNamespaces method of SimpleXMLElement does not return the namespace with empty url (using xml with y:xmlns=""). |
Have you just tried omitting |
Yes, I did and it does not work. |
Running into the exact same problem atm while trying to consume and create XML for German Tax authorities. Currently trying to throw a PR together. |
Would be great, thanks |
This is a basic implementation of `xmlns=""` handling.
This is a basic implementation of `xmlns=""` handling.
See #1095. From: #1087 (comment) Case 1 & 3 should be fixed. |
I think it should be handled for collections too. |
If you could come up with a proper test case, I am willing to add it to my implementation. However, I'd love to hear input vrom @goetas first if I am on the right track. PS: @antonioturdo is your issue fixed with my implementation? Did you check? |
This is a basic implementation of `xmlns=""` handling.
This is a basic implementation of `xmlns=""` handling.
I am sorry I have no time to provide a test case about collections. |
implemented in #1095 |
I really am not sure whether this is a bug or not. I have a third party xml that looks like this:
An empty namespace should means no default namespace has to be considered for B.
Current implementation:
The document has default namespace, but since "B" element is not in the default namespace, I think xpath correctly doesn't found it.
Steps required to reproduce the problem
Expected Result
Actual Result
The text was updated successfully, but these errors were encountered: