3 ms·
There are umpteen versions of this sort (there was even an ActiveState cookbook recipe at one point, I think). The problem is that they tend to be coded up with
by toyg 13y ago
There are umpteen versions of this sort (there was even an ActiveState cookbook recipe at one point, I think). The problem is that they tend to be coded up with certain requirements in mind, without really going through XML specs, so inevitably you'll find places where they break down.
In this case, I don't see any namespace in examples nor (more damning) in unit tests, which tells me it's likely going to fail on complex documents with multiple namespaces.
- HNLogInShit 13y agoNamespaces in XML were a blunder and shouldn't even exist. Sadly we're still paying the price.