Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

EvaluateXPathsForElement gives "Content contains characters which cannot be encoded"

$
0
0

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!


Viewing all articles
Browse latest Browse all 78596


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>