before you retrive some information for a element, you should do the following check (nodeTemp->getNodeType() == DOMNode::ELEMENT_NODE)
only ELEMENT_NODE contains the information you need. I also think xerces c++ is not as friendly as JDOM On Wed, Aug 25, 2010 at 4:06 PM, <[email protected]> wrote: > Hi, > > I'm having kind of a silly bug with 2.8. > I try to parse an XSD File as XML. > As I want to calculate the diff of 2 xsd files. > As XSD Files are valid XML, that should work. > > But I have the problem, that every node inside of <schema> > Seems not to be read by xerces correclty: > > Some Code: > DOMNode* node = src1->getDocumentElement(); > std::string name; > XML2String(name,node->getNodeName());// this is a function converting > XMLCh* to std::string > std::cout << name << std::endl; > XML2String(name,node->getFirstChild()->getNodeName()); > > Output of this code is: > Schema > #text > > All Nodes inside of Schema get returned as "#text". > Is this a known "bug", and is there a way to work around it? > Is there an option I could activate? > > Regards, > > Jens Weller > -- Weiwei Wang 王巍巍 百度 商务搜索部 工位:F5-BE327 分机:5594 地址:北京市海淀区上地十街10号 百度大厦 100085 手机:18601042316 百度 Hi: elegate
