[xsd-users] New user has trouble getting some of the data out of doxygen-generated xml.

Cristiano Di Buduo cristiano_di_buduo at hotmail.com
Wed Jun 29 12:37:16 EDT 2011


Hi, i recently started using xsd and am glad it's around.

But i have two minor usage issues:
 
One is that i have two .xsd files which need interface classes, but they both define the type "DoxygenType", which results in duplicate identifier errors in the generated code. I tried to put them into separate namespaces, but that caused a whole new bunch of problems. Is there a way to get around this?
 
The second issue is that i cannot seem to access some of the data. Code example:
-----     -----     -----     -----     -----     -----     -----     -----
auto_ptr<DoxygenType> b(doxygen("xml/main_8cpp.xml",xml_schema::flags::keep_dom));
 
for(DoxygenType::compounddef_const_iterator i = b->compounddef().begin(); i!= b->compounddef().end(); i++) {
 for(compounddefType::sectiondef_const_iterator j = i->sectiondef().begin(); j!=i->sectiondef().end(); j++) {
  cout<<j->kind()<<endl;   // Works fine
  for(sectiondefType::memberdef_const_iterator k =  j->memberdef().begin(); k!= j->memberdef().end(); k++) {
   //cout<<k->type()<<endl; // Doesn't work
   //cout<<k->argsstring()<<endl;  // Doesn't work
  }
 }
}
-----     -----     -----     -----     -----     -----     -----     -----
You'll notice i passed keep_dom. I tried to get the value through _node. The DOMNode's there, as i verified its node name to be correct, but getting the node value returns null, even though there's a value in the xml.
 

Thanks in advance!
 		 	   		  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compound.xsd
Type: application/octet-stream
Size: 34071 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20110629/821467f6/compound-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_8cpp.xml
Type: application/xml
Size: 52147 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20110629/821467f6/main_8cpp-0001.xml


More information about the xsd-users mailing list