Martinke, Stefan wrote:
> char* nodename = XMLString::transcode(rootnode->getNodeName);
Hi Stefan,
you surely wanted to write
char* nodename = XMLString::transcode(rootnode->getNodeName());
> if(strcmp(nodename,"Device")==0)
I usually check for NULL:
if (nodename && strcmp(nodename,"Device")==0)
> {
> char* devicename;
> DOMNamedNodeMap * map = rootnode->getAttributes();
> XMLCh* temp1 = XMLString::transcode("Name");
> DOMNode *tmp1 = map->getNamedItem(temp1);
> if(tmp1 !=NULL)
> {
> devicename = XMLString::transcode(tmp1->getNodeValue);
Again, you should prefer
devicename = XMLString::transcode(tmp1->getNodeValue());
> }
> XMLString::release(temp1);
> }
> XMLString::release(nodename);
> ...
Maybe you want to hold temp1 as a constant, so you won't need to
transcode and release. But that's almost cosmetic...
> I already tried to do several things to solve my problem. I've set the
> codepage to the german one by using setlocale(LC_CTYPE,
> "de_DE.UTF-8");
> in my main but it didn't help.
This is necessary for transcode to work, unless you use ICU.
> Does anybody know a solution os has a hiont for me?
Well, correct above errors...
Cheers,
Axel