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

XML namespace operators #8

Merged
merged 11 commits into from
Aug 19, 2018
Merged

XML namespace operators #8

merged 11 commits into from
Aug 19, 2018

Conversation

rvanheest
Copy link
Owner

To support namespaces in XML parsing/serializing, the following things were added to the library:

  • node, emptyNode, stringNode and branchNode got overloads with the NamespaceBinding as the second argument. When using these overloads, the node's name is given the prefix of the NamespaceBinding.
  • namespaceAttribute is renamed to attribute and no longer has the implicit NamespaceBinding; instead it is now an overload with a second parameter containing the namespace. When using this overload, the attribute's name is given the prefix of the NamespaceBinding.
  • A new operator withNamespace was added to XmlSerializer and XmlPickle that adds the actual namespace(s) to a node.
    • Note that this operator was not added to XmlParser. So far I haven't gotten it to work in all circumstances. The only thing it does, though, is verify that this namespace is actually present in the xml structure. This is not a critical feature to have, so for now I left it out.

Furthermore, tests were added for these new overloads and operators. Also an example was added to demonstrate the use of namespaces in spickle.

Repository owner deleted a comment Aug 18, 2018
Repository owner deleted a comment Aug 18, 2018
@rvanheest rvanheest merged commit 636fe31 into master Aug 19, 2018
@rvanheest rvanheest deleted the namespace branch August 19, 2018 18:59
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

Successfully merging this pull request may close these issues.

1 participant