0

I tried to use 2 different implementations of TouchXML, one provided with SudzC and the other from TouchXML github repo. There is a little difference between them, consisting in the initialization of the CXMLDocument:

GitHub:

CFStringEncoding cfenc = CFStringConvertNSStringEncodingToEncoding(encoding);
CFStringRef cfencstr = CFStringConvertEncodingToIANACharSetName(cfenc);
const char *enc = CFStringGetCStringPtr(cfencstr, 0);
theDoc = htmlReadMemory([inData bytes], [inData length], NULL, enc, HTML_PARSE_NONET | HTML_PARSE_NOBLANKS | HTML_PARSE_NOWARNING);

SudzC version

theDoc = xmlParseMemory([inData bytes], [inData length]);

The problem is in the output, cause when querying the rootElement of the GitHub version it returns "soap:Envelope" and SudzC version returns "Envelope".

Could you please explain me why do I get different versions of output and how could I obtain in the GitHub version the output without "soap:" prefix?

Thanks in advance. I hope I have given enough information.

4

1 回答 1

1

我遇到了同样的问题,我发现它与 TouchXML 版本的差异有关。GitHub 版本包含前缀解析实现,而 SudzC 版本没有。

于 2012-12-08T19:16:40.993 回答