sinairv/YAXLib — pull request #1 by SPARTAN563 (2012-07-10 21:21:40+00:00)
Title: Namespace support

**Description**
Added preliminary support for serialization and deserialization of XML with custom namespaces, including namespaces on a class level (with inheritance), custom namespaces for child elements as well as the ability to specify namespaces within relative paths using aliases which are replaced with XNamespace elements at deserialization time.

Basically, it allows you to specify a new YAXNamespace attribute on any element, specifying the namespace and its prefix which will then be used by YAXLib for both serialization and deserialization.

**State**
So far I have only tested with 2 basic cases, more would obviously need to be added, but this was thrown together over about 4 hours and writing lots of tests was not the priority. That being said, it passes all the current unit tests, and shouldn't interfere with any of the current xmlns stuff (unless someone specifies a namespace like yaxlib and then tries to use it, you could always check for that on attribute initialization).

**Motivation**
I was recently working on a project where I wanted users to be able to create XML files making use of an XML schema (which was quite integral to the file structure) but also wanted to make use of the flexibility of YAXLib for parsing the XML files. Unfortunately, YAXLib would fail to deserialize the files if the schema was included as a namespace. Didn't feel like hacking together something which removed the namespace before sending it to YAXLib, so decided to add this functionality to YAXLib instead.

**Enhancements**
If you have any ideas on how I could improve this, or anything you think I should change (or you find a bug in how it handles namespaces) then let me know and I'll see what I can do about fixing it.