2008-07-06 20:18:22 UTC
Hello Joseph,
I am not quite sure I understand what you mean, but I can say the following about 'any' types:
With the current version you will only get output for 'any-types' if erlsom 'knows' the schema of the types are used in the XML instance. This can be types from another schema/namespace; you should use the 'add_xsd_file' function to make this work.
If you do not specify a schema for these types, you currently will not get any output. Often it may be worthwhile to define a schema - after all, if you want to process the data, you should know what to expect, and you should be able to describe this in a schema.
However, I understand that there may be cases where this is not possible. For example if you just need to pass the data to another application, without the need to actually understand it. Therefore I agree that it would be a useful feature if you could get access to this kind of data.
I had a go at this today, and it turned out to be fairly straight forward. I will include this functionality in the next release. If you require it now, I could send you the code, or I could post it here. It could use some additional work, but I believe it should give you the functionality you need.
My modification doesn't do exactly what you proposed: in stead of unparsed, binary data, it gives you the parsed xml in the generic 'simple form'. It is easy to transform this back into xml, if that is what you want.
Let me know if you would like to get this fix, or if the answer is not clear,
Regards,
Willem