We have a plugin that uses the XML tree to modify graphical objects.
We use EvaluateXPathsForElement to find the XML nodes that need modifying.
However, we get the error message: "Content contains characters which cannot be encoded" for the document. The code used is this:
K2Vector<WideString> xPaths; | |
xPaths.push_back(WideString("//*[@c4xpath]")); | |
xPaths.push_back(WideString("//*[@smddatakey]")); | |
IDataBase *db = docref.GetDataBase(); | |
InterfacePtr<IIDXMLElement> rootElement(Utils<IXMLUtils>()->QueryRootElement(db)); | |
HitMatches matches; | |
Utils<IXMLParserUtils>()->EvaluateXPathsForElement(xPaths, rootElement, matches, 0); |
The document is at:
http://dl.dropbox.com/u/3092856/EvaluateXPathsForElement.indd
And I can't see what kind of character should give the error. The document contains no characters at all!
Any help would be greatly appreciated!