473,769 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Xerces C++ Problem

I am unable to get Xerces to write out attributes from a struct which
I am able to print out and verify is correct. The structs are defined
below as is subsection of the output.

Expand|Select|Wrap|Line Numbers
  1.  
  2. int DDAS_XML_Handler::writeResultDocument( int job_id, int
  3. num_results, DDAS_CLIENT_RESULT_DATA* results )
  4. {
  5. try
  6. {
  7.  
  8. DOMElement* data_row;
  9. DOMElement* coeff;
  10. DOMElement* root;
  11.  
  12. DOMAttr* sse_attr;
  13. DOMAttr* bin_rep_attr;
  14. DOMAttr* def_num_attr;
  15. DOMAttr* index_attr;
  16. DOMAttr* value_attr;
  17. DOMAttr* job_id_attr;
  18.  
  19. XMLCh* data_row_ch      =
  20. XMLString::transcode("data_row");
  21. XMLCh* sse_ch           = XMLString::transcode("SSE");
  22. XMLCh* bin_rep_ch       =
  23. XMLString::transcode("binary_representation");
  24. XMLCh* def_num_ch       =
  25. XMLString::transcode("definition_number");
  26. XMLCh* coeff_ch         =
  27. XMLString::transcode("coefficient");
  28. XMLCh* index_ch         =
  29. XMLString::transcode("index");
  30. XMLCh* value_ch         =
  31. XMLString::transcode("value");
  32. XMLCh* job_id_ch        =
  33. XMLString::transcode("jobID");
  34.  
  35. //printDCRD(results);
  36.  
  37. //create a DOM
  38. DOMImplementation* impl =
  39. DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Range"));
  40. DOMDocument* doc        = impl->createDocument(0,
  41. XMLString::transcode("job_results"), 0);
  42.  
  43. //document root
  44. root = doc->getDocumentElement();
  45.  
  46. //root's job ID attribute
  47. job_id_attr     = doc->createAttribute(job_id_ch);
  48.  
  49. //add the job_id attribute to root tag
  50. char* job_buffer = new char[128];
  51. sprintf( job_buffer, "%i", job_id );
  52. XMLString::trim(job_buffer);
  53. job_id_attr-
  54.         
  55.                 >setValue(XMLString::transcode(job_buffer));
  56.  
  57. root->setAttributeNode(job_id_attr);
  58. delete[] job_buffer;
  59.  
  60. //for each data row
  61. for( int i=0; i<num_results; i++ )
  62. {
  63. data_row        = doc-
  64.         
  65.                 >createElement(data_row_ch);
  66.  
  67. sse_attr        = doc-
  68.         
  69.                 >createAttribute(sse_ch);
  70.  
  71. bin_rep_attr    = doc-
  72.         
  73.                 >createAttribute(bin_rep_ch);
  74.  
  75. def_num_attr    = doc-
  76.         
  77.                 >createAttribute(def_num_ch);
  78.  
  79. //set SSE value
  80. char* sse_buffer = new char[128];
  81. sprintf( sse_buffer, "%f", results->SSEs[i] );
  82.  
  83. //set binary representation value
  84. char* br_buffer = new char[128];
  85. sprintf( br_buffer, "%s", results-
  86.         
  87.                 >bin_reps[i] );
  88.  
  89. //set defintion number value
  90. char* dn_buffer = new char[128];
  91. sprintf( dn_buffer, "%s", results-
  92.         
  93.                 >def_nums[i] );
  94.  
  95. //trim strings
  96. XMLString::trim(sse_buffer);
  97. XMLString::trim(br_buffer);
  98. XMLString::trim(dn_buffer);
  99.  
  100. //convert to XMLCh*
  101. XMLCh* sse_val     =
  102. XMLString::transcode(sse_buffer);
  103. XMLCh* bin_rep_val =
  104. XMLString::transcode(br_buffer);
  105. XMLCh* def_num_val =
  106. XMLString::transcode(dn_buffer);
  107.  
  108. //set attr values
  109. sse_attr    ->setValue(sse_val);
  110. bin_rep_attr->setValue(bin_rep_val);
  111. def_num_attr->setValue(def_num_val);
  112.  
  113. //append attribute nodes to data row
  114. data_row->setAttributeNode(sse_attr);
  115. data_row->setAttributeNode(bin_rep_attr);
  116. data_row->setAttributeNode(def_num_attr);
  117.  
  118. //append data row to root
  119. root->appendChild(data_row);
  120.  
  121. //free memory
  122. delete[] sse_buffer;
  123. delete[] br_buffer;
  124. delete[] dn_buffer;
  125. XMLString::release(&sse_val);
  126. XMLString::release(&bin_rep_val);
  127. XMLString::release(&def_num_val);
  128.  
  129. //handle coefficients on a per data row basis
  130. for( unsigned int j=0; j<results->coefficients-
  131.         
  132.                 >size; j++)
  133.  
  134. {
  135. //create coefficient element
  136. coeff = doc->createElement(coeff_ch);
  137.  
  138. //create attribute nodes
  139. index_attr = doc-
  140.         
  141.                 >createAttribute(index_ch);
  142.  
  143. value_attr = doc-
  144.         
  145.                 >createAttribute(value_ch);
  146.  
  147. //request some space for conversion
  148. char* index_buffer = new char[128];
  149. char* value_buffer = new char[128];
  150.  
  151. //convert from numeric to char*
  152. sprintf( index_buffer, "%i", results-
  153.         
  154.                 >coefficients[i].index[j] );
  155.  
  156. sprintf( value_buffer, "%f", results-
  157.         
  158.                 >coefficients[i].values[j] );
  159.  
  160. //remove whitespace
  161. XMLString::trim(index_buffer);
  162. XMLString::trim(value_buffer);
  163.  
  164. //create values as XMLCh*
  165. XMLCh* index_val =
  166. XMLString::transcode(index_buffer);
  167. XMLCh* value_val =
  168. XMLString::transcode(value_buffer);
  169.  
  170. //set values
  171. index_attr->setValue(index_val);
  172. value_attr->setValue(value_val);
  173.  
  174. coeff->setAttributeNode(index_attr);
  175. coeff->setAttributeNode(value_attr);
  176.  
  177. //append coefficient to data row
  178. data_row->appendChild(coeff);
  179.  
  180. //free memory
  181. delete[] index_buffer;
  182. delete[] value_buffer;
  183.  
  184. }//end inner for loop
  185.  
  186.  
  187. }//end outer for loop
  188.  
  189. //DOM serializer
  190. DOMWriter* writer = ((DOMImplementationLS*)impl)-
  191.         
  192.                 >createDOMWriter();
  193.  
  194. //request some space for URL
  195. char* buffer = new char[512];
  196.  
  197. //create URL based on job ID
  198. sprintf( buffer, "%sjob_%u_results.xml",
  199. DDAS_RESULT_URL, job_id );
  200.  
  201. //remove whitespace
  202. XMLString::trim(buffer);
  203.  
  204. //create URL as XMLCh*
  205. XMLCh* url_ch = XMLString::transcode(buffer);
  206.  
  207. //set output type
  208. LocalFileFormatTarget local_file( url_ch );
  209.  
  210. //set some formatting options
  211. if (writer-
  212.         
  213.                 >canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
  214.  
  215. writer-
  216.         
  217.                 >setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
  218.  
  219. if (writer-
  220.         
  221.                 >canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
  222.  
  223. writer-
  224.         
  225.                 >setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
  226.  
  227. //actually write the root node to file
  228. writer->writeNode(&local_file, *root);
  229.  
  230. //free resources
  231. writer  ->release();
  232. doc     ->release();
  233. delete[] buffer;
  234.  
  235. return 1;
  236.  
  237. }
  238. catch( XMLException& e)
  239. {
  240. char* message =
  241. XMLString::transcode( e.getMessage() );
  242. cerr << "The following error occurred during
  243. the DOM creation: " << message << endl;
  244. XMLString::release( &message );
  245. }
  246. }
  247.  
  248.  

Here are the structs used:

Expand|Select|Wrap|Line Numbers
  1.  
  2. struct REGRESSION_COEFFICIENTS
  3. {
  4. //which column are talking about
  5. int*            index;
  6.  
  7. //the value of the linear coefficient
  8. double*         values;
  9.  
  10. //the size of the struct
  11. unsigned int    size;
  12. };
  13.  
  14.  
  15. ///A struct used to hold the client result data
  16. struct DDAS_CLIENT_RESULT_DATA
  17. {
  18. /// The binary representation of the definition number -
  19. serves to disambiguate endianess
  20. char**          bin_reps;
  21.  
  22. /// The decimal representation of the combination of
  23. independent variables used in this regression (1011 base 2 == 11 base
  24. 10)
  25. char**          def_nums;
  26.  
  27. /// The sum of squared error for the linear regression
  28. double*         SSEs;
  29.  
  30. /// How many results are contained in the struct
  31. unsigned int   size;
  32.  
  33. //regression coefficients
  34. REGRESSION_COEFFICIENTS* coefficients;
  35. };
  36.  
  37.  

And here is a sample of the output:

[OUTPUT]

<data_row SSE="137.527403 " binary_represen tation="1010111 011111001"
definition_numb er="44793">
<coefficient index="0" value="-0.000977"/>
<coefficient index="1" value="0.000000 "/>
<coefficient index="2" value="0.000000 "/>
<coefficient index="3" value="-66123751426.362 999"/>
<coefficient index="4" value="0.000088 "/>
<coefficient index="5" value="10958014 73.097510"/>
<coefficient index="6" value="0.003840 "/>
<coefficient index="7" value="-26494374893.985 001"/>
<coefficient index="8" value="0.000000 "/>
<coefficient index="9" value="0.097907 "/>
<coefficient index="10" value="0.004219 "/>
<coefficient index="11" value="66123751 426.363098"/>
<coefficient index="12" value="0.000000 "/>
<coefficient index="13" value="-1095801473.1025 00"/>
<coefficient index="14" value="0.000000 "/>
<coefficient index="15" value="26494374 894.009701"/>
</data_row>

<data_row SSE="137.533380 " binary_represen tation=""
definition_numb er="">
<coefficient index="0" value="-0.001039"/>
<coefficient index="1" value="0.097757 "/>
<coefficient index="2" value="75825857 3.171398"/>
<coefficient index="3" value="-35123845436.044 098"/>
<coefficient index="4" value="0.000000 "/>
<coefficient index="5" value="0.000000 "/>
<coefficient index="6" value="-464164413.89040 3"/>
<coefficient index="7" value="0.024555 "/>
<coefficient index="8" value="0.000000 "/>
<coefficient index="9" value="0.000000 "/>
<coefficient index="10" value="-758258573.16723 3"/>
<coefficient index="11" value="35123845 436.044197"/>
<coefficient index="12" value="0.000016 "/>
<coefficient index="13" value="-0.004898"/>
<coefficient index="14" value="46416441 3.894253"/>
<coefficient index="15" value="0.000000 "/>
</data_row>

<data_row SSE="137.533796 " binary_represen tation="0111111 011P>V"
definition_numb er="32457">
<coefficient index="0" value="-0.001034"/>
<coefficient index="1" value="0.000000 "/>
<coefficient index="2" value="0.000000 "/>
<coefficient index="3" value="-35209041045.623 802"/>
<coefficient index="4" value="0.000000 "/>
<coefficient index="5" value="0.000000 "/>
<coefficient index="6" value="-425970878.52097 1"/>
<coefficient index="7" value="0.024583 "/>
<coefficient index="8" value="0.000000 "/>
<coefficient index="9" value="0.097997 "/>
<coefficient index="10" value="0.004175 "/>
<coefficient index="11" value="35209041 045.623802"/>
<coefficient index="12" value="-0.000016"/>
<coefficient index="13" value="-0.004899"/>
<coefficient index="14" value="42597087 8.524831"/>
<coefficient index="15" value="0.000000 "/>
</data_row>

[/OUTPUT]
Some of the output is correct, some is there but erroneous, some is
missing altogether. Each data_row element should have a
definition_numb er with some value between 0 and (2^16)-1. The binary
representation is merely the binary representation of the decimal
value. I have spent many hours trying to figure out what the error
is. Again, I am able to print the struct (printDCRD) at the beginning
of the method and verify that the data contained therein is correct
and present.

So, if anyone can lend me some attention cycles, I'd greatly
appreciate it.

Thanks ahead.
Jun 27 '08 #1
3 1924
On May 9, 7:26*pm, mearvk <mea...@gmail.c omwrote:
I am unable to get Xerces to write out attributes from a struct which
I am able to print out and verify is correct. The structs are defined
below as is subsection of the output.

Expand|Select|Wrap|Line Numbers
  1. int DDAS_XML_Handler::writeResultDocument( int job_id, int
  2. num_results, DDAS_CLIENT_RESULT_DATA* results )
  3. * * * * {
  4. * * * * * * * * try
  5. * * * * * * * * {
  6. * * * * * * * * DOMElement* data_row;
  7. * * * * * * * * DOMElement* coeff;
  8. * * * * * * * * DOMElement* root;
  9. * * * * * * * * DOMAttr* sse_attr;
  10. * * * * * * * * DOMAttr* bin_rep_attr;
  11. * * * * * * * * DOMAttr* def_num_attr;
  12. * * * * * * * * DOMAttr* index_attr;
  13. * * * * * * * * DOMAttr* value_attr;
  14. * * * * * * * * DOMAttr* job_id_attr;
  15. * * * * * * * * XMLCh* data_row_ch * * *=
  16. XMLString::transcode("data_row");
  17. * * * * * * * * XMLCh* sse_ch * * * * * = XMLString::transcode("SSE");
  18. * * * * * * * * XMLCh* bin_rep_ch * * * =
  19. XMLString::transcode("binary_representation");
  20. * * * * * * * * XMLCh* def_num_ch * * * =
  21. XMLString::transcode("definition_number");
  22. * * * * * * * * XMLCh* coeff_ch * * * * =
  23. XMLString::transcode("coefficient");
  24. * * * * * * * * XMLCh* index_ch * * * * =
  25. XMLString::transcode("index");
  26. * * * * * * * * XMLCh* value_ch * * * * =
  27. XMLString::transcode("value");
  28. * * * * * * * * XMLCh* job_id_ch * * * *=
  29. XMLString::transcode("jobID");
  30. * * * * * * * * //printDCRD(results);
  31. * * * * * * * * //create a DOM
  32. * * * * * * * * DOMImplementation* impl =
  33. DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Range*"));
  34. * * * * * * * * DOMDocument* doc * * * *= impl->createDocument(0,
  35. XMLString::transcode("job_results"), 0);
  36. * * * * * * * * //document root
  37. * * * * * * * * root = doc->getDocumentElement();
  38. * * * * * * * * //root's job ID attribute
  39. * * * * * * * * job_id_attr * * = doc->createAttribute(job_id_ch);
  40. * * * * * * * * //add the job_id attribute to root tag
  41. * * * * * * * * char* job_buffer = new char[128];
  42. * * * * * * * * sprintf( job_buffer, "%i", job_id );
  43. * * * * * * * * XMLString::trim(job_buffer);
  44. * * * * * * * * job_id_attr->setValue(XMLString::transcode(job_buffer));
  45. * * * * * * * * root->setAttributeNode(job_id_attr);
  46. * * * * * * * * delete[] job_buffer;
  47. * * * * * * * * //for each data row
  48. * * * * * * * * for( int i=0; i<num_results; i++ )
  49. * * * * * * * * {
  50. * * * * * * * * * * * * data_row * * * *= doc->createElement(data_row_ch);
  51. * * * * * * * * * * * * sse_attr * * * *= doc->createAttribute(sse_ch);
  52. * * * * * * * * * * * * bin_rep_attr * *= doc->createAttribute(bin_rep_ch);
  53. * * * * * * * * * * * * def_num_attr * *= doc-
  54.         
  55.                 createAttribute(def_num_ch);
  •  
  • * * * * * * * * * * * * //set SSE value
  • * * * * * * * * * * * * char* sse_buffer = new char[128];
  • * * * * * * * * * * * * sprintf( sse_buffer, "%f",results->SSEs[i] );
  • * * * * * * * * * * * * //set binary representation value
  • * * * * * * * * * * * * char* br_buffer = new char[128];
  • * * * * * * * * * * * * sprintf( br_buffer, "%s", results-
  •         
  •                 bin_reps[i] );
  •  
  • * * * * * * * * * * * * //set defintion number value
  • * * * * * * * * * * * * char* dn_buffer = new char[128];
  • * * * * * * * * * * * * sprintf( dn_buffer, "%s", results-
  •         
  •                 def_nums[i] );
  •  
  • * * * * * * * * * * * * //trim strings
  • * * * * * * * * * * * * XMLString::trim(sse_buffer);
  • * * * * * * * * * * * * XMLString::trim(br_buffer);
  • * * * * * * * * * * * * XMLString::trim(dn_buffer);
  • * * * * * * * * * * * * //convert to XMLCh*
  • * * * * * * * * * * * * XMLCh* sse_val * * =
  • XMLString::transcode(sse_buffer);
  • * * * * * * * * * * * * XMLCh* bin_rep_val =
  • XMLString::transcode(br_buffer);
  • * * * * * * * * * * * * XMLCh* def_num_val =
  • XMLString::transcode(dn_buffer);
  • * * * * * * * * * * * * //set attr values
  • * * * * * * * * * * * * sse_attr * *->setValue(sse_val);
  • * * * * * * * * * * * * bin_rep_attr->setValue(bin_rep_val);
  • * * * * * * * * * * * * def_num_attr->setValue(def_num_val);
  • * * * * * * * * * * * * //append attribute nodes to data row
  • * * * * * * * * * * * * data_row->setAttributeNode(sse_attr);
  • * * * * * * * * * * * * data_row->setAttributeNode(bin_rep_attr);
  • * * * * * * * * * * * * data_row->setAttributeNode(def_num_attr);
  • * * * * * * * * * * * * //append data row to root
  • * * * * * * * * * * * * root->appendChild(data_row);
  • * * * * * * * * * * * * //free memory
  • * * * * * * * * * * * * delete[] sse_buffer;
  • * * * * * * * * * * * * delete[] br_buffer;
  • * * * * * * * * * * * * delete[] dn_buffer;
  • * * * * * * * * * * * * XMLString::release(&sse_val);
  • * * * * * * * * * * * * XMLString::release(&bin_rep_val);
  • * * * * * * * * * * * * XMLString::release(&def_num_val);
  • * * * * * * * * * * * * //handle coefficients on aper data row basis
  • * * * * * * * * * * * * for( unsigned int j=0; j<results->coefficients->size; j++)
  • * * * * * * * * * * * * {
  • * * * * * * * * * * * * * * * * //create coefficient element
  • * * * * * * * * * * * * * * * * coeff = doc->createElement(coeff_ch);
  • * * * * * * * * * * * * * * * * //create attribute nodes
  • * * * * * * * * * * * * * * * * index_attr= doc->createAttribute(index_ch);
  • * * * * * * * * * * * * * * * * value_attr= doc-
  •         
  •                 createAttribute(value_ch);
  •  
  • * * * * * * * * * * * * * * * * //request some space for conversion
  • * * * * * * * * * * * * * * * * char* index_buffer = new char[128];
  • * * * * * * * * * * * * * * * * char* value_buffer = new char[128];
  • * * * * * * * * * * * * * * * * //convert from numeric to char*
  • * * * * * * * * * * * * * * * * sprintf( index_buffer, "%i", results->coefficients[i].index[j] );
  • * * * * * * * * * * * * * * * * sprintf( value_buffer, "%f", results-
  •         
  •                 coefficients[i].values[j] );
  •  
  • * * * * * * * * * * * * * * * * //remove whitespace
  • * * * * * * * * * * * * * * * * XMLString::trim(index_buffer);
  • * * * * * * * * * * * * * * * * XMLString::trim(value_buffer);
  • * * * * * * * * * * * * * * * * //create values as XMLCh*
  • * * * * * * * * * * * * * * * * XMLCh* index_val =
  • XMLString::transcode(index_buffer);
  • * * * * * * * * * * * * * * * * XMLCh* value_val =
  • XMLString::transcode(value_buffer);
  • * * * * * * * * * * * * * * * * //set values
  • * * * * * * * * * * * * * * * * index_attr->setValue(index_val);
  • * * * * * * * * * * * * * * * * value_attr->setValue(value_val);
  • * * * * * * * * * * * * * * * * coeff->setAttributeNode(index_attr);
  • * * * * * * * * * * * * * * * * coeff->setAttributeNode(value_attr);
  • * * * * * * * * * * * * * * * * //append coefficient to data row
  • * * * * * * * * * * * * * * * * data_row->appendChild(coeff);
  • * * * * * * * * * * * * * * * * //free memory
  • * * * * * * * * * * * * * * * * delete[] index_buffer;
  • * * * * * * * * * * * * * * * * delete[] value_buffer;
  • * * * * * * * * * * * * }//end inner for loop
  • * * * * * * * * }//end outer for loop
  • * * * * * * * * //DOM serializer
  • * * * * * * * * DOMWriter* writer = ((DOMImplementationLS*)impl)-
  •         
  •                 createDOMWriter();
  •  
  • * * * * * * * * //request some space for URL
  • * * * * * * * * char* buffer = new char[512];
  • * * * * * * * * //create URL based on job ID
  • * * * * * * * * sprintf( buffer, "%sjob_%u_results.xml",
  • DDAS_RESULT_URL, job_id );
  • * * * * * * * * //remove whitespace
  • * * * * * * * * XMLString::trim(buffer);
  • * * * * * * * * //create URL as XMLCh*
  • * * * * * * * * XMLCh* url_ch = XMLString::transcode(buffer);
  • * * * * * * * * //set output type
  • * * * * * * * * LocalFileFormatTarget local_file( url_ch );
  • * * * * * * * * //set some formatting options
  • * * * * * * * * if (writer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
  • * * * * * * * * * * * * writer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
  • * * * * * * * * if (writer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
  • * * * * * * * * * * * * writer-
  •         
  •                 setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
  •  
  • * * * * * * * * //actually write the root node to file
  • * * * * * * * * writer->writeNode(&local_file, *root);
  • * * * * * * * * //free resources
  • * * * * * * * * writer *->release();
  • * * * * * * * * doc * * ->release();
  • * * * * * * * * delete[] buffer;
  • * * * * * * * * return 1;
  • * * * * * * * * }
  • * * * * * * * * catch( XMLException& e)
  • * * * * * * * * {
  • * * * * * * * * * * * * char* message =
  • XMLString::transcode( e.getMessage() );
  • * * * * * * * * * * * * cerr << "The following error occurred during
  • the DOM creation: " << message << endl;
  • * * * * * * * * * * * * XMLString::release( &message );
  • * * * * * * * * }
  • * * * * }
  •  

  • Here are the structs used:

    Expand|Select|Wrap|Line Numbers
    1. struct REGRESSION_COEFFICIENTS
    2. {
    3. * * * * //which column are talking about
    4. * * * * int* * * * * * *index;
    5. * * * * //the value of the linear coefficient
    6. * * * * double* * * * * values;
    7. * * * * //the size of the struct
    8. * * * * unsigned int * *size;
    9. };
    10. ///A struct used to hold the client result data
    11. struct DDAS_CLIENT_RESULT_DATA
    12. {
    13. * * * * /// The binary representation of the definition number -
    14. serves to disambiguate endianess
    15. * * * * char** * * * * *bin_reps;
    16. * * * * /// The decimal representation of the combination of
    17. independent variables used in this regression (1011 base 2 == 11 base
    18. 10)
    19. * * * * char** * * * * *def_nums;
    20. * * * * /// The sum of squared error for the linear regression
    21. * * * * double* * * * * SSEs;
    22. * * * * /// How many results are contained in the struct
    23. * * * * unsigned int * size;
    24. * * * * //regression coefficients
    25. * * * * REGRESSION_COEFFICIENTS* coefficients;
    26. };
    27.  

    And here is a sample of the output:

    [OUTPUT]

    * <data_row SSE="137.527403 " binary_represen tation="1010111 011111001"
    definition_numb er="44793">
    * * <coefficient index="0" value="-0.000977"/>
    * * <coefficient index="1" value="0.000000 "/>
    * * <coefficient index="2" value="0.000000 "/>
    * * <coefficient index="3" value="-66123751426.362 999"/>
    * * <coefficient index="4" value="0.000088 "/>
    * * <coefficient index="5" value="10958014 73.097510"/>
    * * <coefficient index="6" value="0.003840 "/>
    * * <coefficient index="7" value="-26494374893.985 001"/>
    * * <coefficient index="8" value="0.000000 "/>
    * * <coefficient index="9" value="0.097907 "/>
    * * <coefficient index="10" value="0.004219 "/>
    * * <coefficient index="11" value="66123751 426.363098"/>
    * * <coefficient index="12" value="0.000000 "/>
    * * <coefficient index="13" value="-1095801473.1025 00"/>
    * * <coefficient index="14" value="0.000000 "/>
    * * <coefficient index="15" value="26494374 894.009701"/>
    * </data_row>

    * <data_row SSE="137.533380 " binary_represen tation=""
    definition_numb er="">
    * * <coefficient index="0" value="-0.001039"/>
    * * <coefficient index="1" value="0.097757 "/>
    * * <coefficient index="2" value="75825857 3.171398"/>
    * * <coefficient index="3" value="-35123845436.044 098"/>
    * * <coefficient index="4" value="0.000000 "/>
    * * <coefficient index="5" value="0.000000 "/>
    * * <coefficient index="6" value="-464164413.89040 3"/>
    * * <coefficient index="7" value="0.024555 "/>
    * * <coefficient index="8" value="0.000000 "/>
    * * <coefficient index="9" value="0.000000 "/>
    * * <coefficient index="10" value="-758258573.16723 3"/>
    * * <coefficient index="11" value="35123845 436.044197"/>
    * * <coefficient index="12" value="0.000016 "/>
    * * <coefficient index="13" value="-0.004898"/>
    * * <coefficient index="14" value="46416441 3.894253"/>
    * * <coefficient index="15" value="0.000000 "/>
    * </data_row>

    * <data_row SSE="137.533796 " binary_represen tation="0111111 011P>V"
    definition_numb er="32457">
    * * <coefficient index="0" value="-0.001034"/>
    * * <coefficient index="1" value="0.000000 "/>
    * * <coefficient index="2" value="0.000000 "/>
    * * <coefficient index="3" value="-35209041045.623 802"/>
    * * <coefficient index="4" value="0.000000 "/>
    * * <coefficient index="5" value="0.000000 "/>
    * * <coefficient index="6" value="-425970878.52097 1"/>
    * * <coefficient index="7" value="0.024583 "/>
    * * <coefficient index="8" value="0.000000 "/>
    * * <coefficient index="9" value="0.097997 "/>
    * * <coefficient index="10" value="0.004175 "/>
    * * <coefficient index="11" value="35209041 045.623802"/>
    * * <coefficient index="12" value="-0.000016"/>
    * * <coefficient index="13" value="-0.004899"/>
    * * <coefficient index="14" value="42597087 8.524831"/>
    * * <coefficient index="15" value="0.000000 "/>
    * </data_row>

    [/OUTPUT]

    Some of the output is correct, some is there but erroneous, some is
    missing altogether. Each data_row element should have a
    definition_numb er with some value between 0 and (2^16)-1. The binary
    representation is merely the binary representation of the decimal
    value. I have spent many hours trying to figure out what the error
    is. *Again, I am able to print the struct (printDCRD) at the beginning
    of the method and verify that the data contained therein is correct
    and present.

    So, if anyone can lend me some attention cycles, I'd greatly
    appreciate it.

    Thanks ahead. Anyone?
    Jun 27 '08 #2
    Anyone?

    Have you tried asking on the mailing list specifically for Xerces C++?

    (I haven't used the C++ version in about five years. I might be able to
    dig through this, but given the time it'd take for me to to so you could
    probably get a faster answer by asking the folks actually using and
    developing that parser.)
    Jun 27 '08 #3
    On May 11, 8:54*pm, "Joseph J. Kesselman" <keshlam-nos...@comcast. net>
    wrote:
    Anyone?

    Have you tried asking on the mailing list specifically for Xerces C++?

    (I haven't used the C++ version in about five years. I might be able to
    dig through this, but given the time it'd take for me to to so you could
    probably get a faster answer by asking the folks actually using and
    developing that parser.)
    I'll try it.
    Jun 27 '08 #4

    This thread has been closed and replies have been disabled. Please start a new discussion.

    Similar topics

    3
    3623
    by: Roy Benjamin | last post by:
    I'm developing a WEB service for Sun ONE deployment (AppServer7). I'm developing on Windows XP Pro though will deploy on Solaris, Sun AppServer7 includes a XercesImpl.jar in share/lib. 2 kb different than the one I usually use (xerces-2_1_0). If I compile all my code against the Sun xerces implementation, I get a class-def-not-found-error when trying to write any XML output. java.lang.NoClassDefFoundError:...
    2
    4446
    by: Sylwester Ba³a | last post by:
    Hi, I have problem with Xerces can someone help me? I have implementation Xerces in Visual C++ 6.0. Xerces is only an interface of my application. Everything seems to be working well when I read small XML files for example: 1, 2 or 3 size of MB. But the problem appears when I want to read file with size of 36 MB. Application is loading this file for 13 hours :(((((
    0
    3091
    by: Waseem | last post by:
    Hi I have looked and tried everything and i still cant sort this out i have no idea why this wont work I am using Xerces Perl on Windows and Debian to try this and it wont work on both of them. Basically i am tryin to do simple tree transversale and get the node values out
    0
    1853
    by: Jim Phelps | last post by:
    After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7 for CC 6.2 I have decided to update to at least 2.4. I have downloaded the binary tarball and have installed it on my development server, which runs Solaris 2.8. I do use CC 6.2 for my compiler. I have reset all the environment variables in Korn shell that point to the Xerces distribution. When I try to compile the same piece of code that compiles fine under Xerces...
    0
    1824
    by: Dale Gerdemann | last post by:
    I've been trying to use DOM level 3 with xerces-2_6_2. There's a sample called samples/DOM3.java, but I've had trouble with compilation. I've downloaded Xerces-J-bin.2.6.2 and beta2-dom3-Xerces-J-bin.2.6 and added the following paths to my CLASSPATH: ..../xerces-2_6_2/xercesImpl.jar: ..../xerces-2_6_2/dom3-xercesImpl.jar: ..../xerces-2_6_2/dom3-xml-apis.jar: ..../xerces-2_6_2/xmlParserAPIs.jar: ..../xerces-2_6_2/xercesSamples.jar:
    4
    6412
    by: Sanjay Kumar | last post by:
    Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the library: http://www.apache.org/dist/xml/xerces-c/binaries/xerces-c_2_7_0-windows_2000-msvc_60.zip
    3
    3405
    by: Matt | last post by:
    Hello, Summary: Where can one download a Xerces-C (XML pardser) dynamic library file (.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including server flavors; don't need to support pre-98) without having to build the library from source? We posed this question to the Xerces-users email list, but have yet to
    2
    3409
    by: Vlad Zorinov | last post by:
    I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve it? cheers, Vlad The exception is... tv.ditg.sdl.ParsingException: tv.ditg.sdl.ParsingException:
    3
    1942
    by: Raphael Tagliani | last post by:
    (english version below) Bonjour! Je travaille sur un gros projet java, qui parse beaucoup de fichiers xml au lancement d'un serveur. Nous avons un problème de concurrence qu lancement. En fait, il s'agit d'une erreur Xerces FWK005, et nous sommes incapables de trouver d'où elle provient dans le code. Nous avons déjà essayé de rendre toutes les méthodes qui appellent Xerces synchronized, mais celà
    1
    2016
    by: Blocksom | last post by:
    I am new to Java and XML and I am trying to solve a problem that has bothered for few days. I have download the parser Xerser-1.4.3 and jdk1.5.0_06I install the JDK first and test it, it works.By the way,the location of JDK is:C:\Program Files\Java\jdk1.5.0_06; Then I install the parser to the follow location:C:\Program Files\Java\xerces-1_4_3, using this command right under the C drive. jar xf xerces-j-bin.1.4.3.zip This creates a...
    0
    9579
    marktang
    by: marktang | last post by:
    ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
    0
    9422
    by: Hystou | last post by:
    Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
    1
    9987
    by: Hystou | last post by:
    Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
    0
    9857
    tracyyun
    by: tracyyun | last post by:
    Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
    0
    5294
    by: TSSRALBI | last post by:
    Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
    0
    5444
    by: adsilva | last post by:
    A Windows Forms form does not have the event Unload, like VB6. What one acts like?
    1
    3952
    by: 6302768590 | last post by:
    Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
    2
    3558
    muto222
    by: muto222 | last post by:
    How can i add a mobile payment intergratation into php mysql website.
    3
    2812
    bsmnconsultancy
    by: bsmnconsultancy | last post by:
    In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

    By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

    To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.