I'm writing a wrapper for BaseCamp API and ran into an issue.
The xml I'm getting back has this structure:
<todo-lists>
<todo-list>
</todo-list>
</todo-lists>
The problem is in HandleListDerivative since it does not try the
lowercased, "undashed" version for element names.
What I don't know is that what is the idea behind on operating on
Descendants when deserializing a list and not operating on children
nodes only?
Adding this code fixes this problem:
if (!elements.Any())
{
var lowerName =
name.ToLower().AsNamespaced(Namespace);
elements = root.Descendants().Where(e =>
e.Name.LocalName.RemoveUnderscoresAndDashes() == lowerName);
}
Thanks,
Attila
Thanks!
John