I have a SOAP document that contains another SOAP document as a node value. When I extract the embedded SOAP document (xmlnode->children->contents) this will always be in UTF-8 because that's how xmllib encodes contents internally. My problem is now how to decode the contents so that I can load it via xmlParseDoc? In other words, how can I read the encoding attribute in <?xml...> prior to actually loading the document? I tried loading the UTF-8 encoded document and this can lead to some strange results because the document is actually ISO-8859-1 encoded in the first place. Of course I can just decode the document by calling UTF8Toisolat1 directly but this is not a very generic solution to my problem...
Erik F. Andersen