I updated to 22.214.171.124 today and have a strange regression. I've been using CkoXml to parse the errorXml property that comes out of the other Chilkat methods. This is my code:
Under 9.3.1 (what I was using), I would get something like:
Under 126.96.36.199, I am getting an empty string. Putting a logging line in, it appears that if(foundXML) is never true. The XML coming out of the method (in this case, the smtp method) looks similar so I don't think it's bad input.
asked Aug 21 '13 at 18:44
Thanks. I understand the problem and I'll explain a workaround. However, first things first...
1) The error message that contains information about TCP sockets and SMTP must not have come from the XML object. I suspect you're mistakenly looking at the contents of the LastErrorText on a different object instance -- which would certainly be the MailMan object if it involves SMTP. The XML object has nothing to do with TCP sockets or SMTP...
2) Whenever a Chilkat object is passed as an argument, it should never be nil. The only exception to this case is with the XML Search* methods. The latest version (v9.4.1 at the time of this writing) does a check to see if the input argument is nil, and if so, then immediately fails (returns a failed status, or nil, etc.) without actually calling the underlying method. Because the outermost Objective-C layer is generated, this check happens cases where the argument is a pointer to a Chilkat object (to prevent a crash). However, the XML Search methods shouldn't have followed this behavior, and this is what needs to be fixed in Chilkat v9.4.1.
In any XML Search* method, the first argument indicates the node that is the root of the subtree to be searched. If nil is passed, the behavior is to search the entire XML document from the topmost root. As a workaround, instead of passing nil, one can pass [xml GetRoot] because the GetRoot method returns the root node of the XML document. Therefore, do this to get around the problem:
foundXML = [coreErrorXML SearchForTag:[coreErrorXML GetRoot] tag:@"error"];
answered Aug 22 '13 at 14:19
Thanks. I'll test your workaround and report back.
Just to clarify, the output was from the mailman object. It had an (expected - I was running tests) error and I was parsing it for the 'human readable' version of the lasterrorxml (just the 'error' tags). I don't want to dump all of the error text, just some indication of what went wrong.
answered Aug 22 '13 at 15:28