Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Xerces C++ Problem (http://www.velocityreviews.com/forums/t609707-xerces-c-problem.html)

mearvk 05-09-2008 11:26 PM

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.



Code:


int DDAS_XML_Handler::writeResultDocument( int job_id, int
num_results, DDAS_CLIENT_RESULT_DATA* results )
        {
                try
                {

                DOMElement* data_row;
                DOMElement* coeff;
                DOMElement* root;

                DOMAttr* sse_attr;
                DOMAttr* bin_rep_attr;
                DOMAttr* def_num_attr;
                DOMAttr* index_attr;
                DOMAttr* value_attr;
                DOMAttr* job_id_attr;

                XMLCh* data_row_ch      =
XMLString::transcode("data_row");
                XMLCh* sse_ch          = XMLString::transcode("SSE");
                XMLCh* bin_rep_ch      =
XMLString::transcode("binary_representation");
                XMLCh* def_num_ch      =
XMLString::transcode("definition_number");
                XMLCh* coeff_ch        =
XMLString::transcode("coefficient");
                XMLCh* index_ch        =
XMLString::transcode("index");
                XMLCh* value_ch        =
XMLString::transcode("value");
                XMLCh* job_id_ch        =
XMLString::transcode("jobID");

                //printDCRD(results);

                //create a DOM
                DOMImplementation* impl =
DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Range"));
                DOMDocument* doc        = impl->createDocument(0,
XMLString::transcode("job_results"), 0);

                //document root
                root = doc->getDocumentElement();

                //root's job ID attribute
                job_id_attr    = doc->createAttribute(job_id_ch);

                //add the job_id attribute to root tag
                char* job_buffer = new char[128];
                sprintf( job_buffer, "%i", job_id );
                XMLString::trim(job_buffer);
                job_id_attr-
>setValue(XMLString::transcode(job_buffer));

                root->setAttributeNode(job_id_attr);
                delete[] job_buffer;

                //for each data row
                for( int i=0; i<num_results; i++ )
                {
                        data_row        = doc-
>createElement(data_row_ch);

                        sse_attr        = doc-
>createAttribute(sse_ch);

                        bin_rep_attr    = doc-
>createAttribute(bin_rep_ch);

                        def_num_attr    = doc-
>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 a per 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:

Code:


struct REGRESSION_COEFFICIENTS
{
        //which column are talking about
        int*            index;

        //the value of the linear coefficient
        double*        values;

        //the size of the struct
        unsigned int    size;
};


///A struct used to hold the client result data
struct DDAS_CLIENT_RESULT_DATA
{
        /// The binary representation of the definition number -
serves to disambiguate endianess
        char**          bin_reps;

        /// The decimal representation of the combination of
independent variables used in this regression (1011 base 2 == 11 base
10)
        char**          def_nums;

        /// The sum of squared error for the linear regression
        double*        SSEs;

        /// How many results are contained in the struct
        unsigned int  size;

        //regression coefficients
        REGRESSION_COEFFICIENTS* coefficients;
};


And here is a sample of the output:

[OUTPUT]

<data_row SSE="137.527403" binary_representation="1010111011111001"
definition_number="44793">
<coefficient index="0" value="-0.000977"/>
<coefficient index="1" value="0.000000"/>
<coefficient index="2" value="0.000000"/>
<coefficient index="3" value="-66123751426.362999"/>
<coefficient index="4" value="0.000088"/>
<coefficient index="5" value="1095801473.097510"/>
<coefficient index="6" value="0.003840"/>
<coefficient index="7" value="-26494374893.985001"/>
<coefficient index="8" value="0.000000"/>
<coefficient index="9" value="0.097907"/>
<coefficient index="10" value="0.004219"/>
<coefficient index="11" value="66123751426.363098"/>
<coefficient index="12" value="0.000000"/>
<coefficient index="13" value="-1095801473.102500"/>
<coefficient index="14" value="0.000000"/>
<coefficient index="15" value="26494374894.009701"/>
</data_row>

<data_row SSE="137.533380" binary_representation=""
definition_number="">
<coefficient index="0" value="-0.001039"/>
<coefficient index="1" value="0.097757"/>
<coefficient index="2" value="758258573.171398"/>
<coefficient index="3" value="-35123845436.044098"/>
<coefficient index="4" value="0.000000"/>
<coefficient index="5" value="0.000000"/>
<coefficient index="6" value="-464164413.890403"/>
<coefficient index="7" value="0.024555"/>
<coefficient index="8" value="0.000000"/>
<coefficient index="9" value="0.000000"/>
<coefficient index="10" value="-758258573.167233"/>
<coefficient index="11" value="35123845436.044197"/>
<coefficient index="12" value="0.000016"/>
<coefficient index="13" value="-0.004898"/>
<coefficient index="14" value="464164413.894253"/>
<coefficient index="15" value="0.000000"/>
</data_row>

<data_row SSE="137.533796" binary_representation="0111111011P>V"
definition_number="32457">
<coefficient index="0" value="-0.001034"/>
<coefficient index="1" value="0.000000"/>
<coefficient index="2" value="0.000000"/>
<coefficient index="3" value="-35209041045.623802"/>
<coefficient index="4" value="0.000000"/>
<coefficient index="5" value="0.000000"/>
<coefficient index="6" value="-425970878.520971"/>
<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="35209041045.623802"/>
<coefficient index="12" value="-0.000016"/>
<coefficient index="13" value="-0.004899"/>
<coefficient index="14" value="425970878.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_number 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.

mearvk 05-12-2008 12:24 AM

Re: Xerces C++ Problem
 
On May 9, 7:26*pm, mearvk <mea...@gmail.com> wrote:
> 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.
>
>
Code:

>
> int DDAS_XML_Handler::writeResultDocument( int job_id, int
> num_results, DDAS_CLIENT_RESULT_DATA* results )
> * * * * {
> * * * * * * * * try
> * * * * * * * * {
>
> * * * * * * * * DOMElement* data_row;
> * * * * * * * * DOMElement* coeff;
> * * * * * * * * DOMElement* root;
>
> * * * * * * * * DOMAttr* sse_attr;
> * * * * * * * * DOMAttr* bin_rep_attr;
> * * * * * * * * DOMAttr* def_num_attr;
> * * * * * * * * DOMAttr* index_attr;
> * * * * * * * * DOMAttr* value_attr;
> * * * * * * * * DOMAttr* job_id_attr;
>
> * * * * * * * * XMLCh* data_row_ch * * *=
> XMLString::transcode("data_row");
> * * * * * * * * XMLCh* sse_ch * * * * * = XMLString::transcode("SSE");
> * * * * * * * * XMLCh* bin_rep_ch * * * =
> XMLString::transcode("binary_representation");
> * * * * * * * * XMLCh* def_num_ch * * * =
> XMLString::transcode("definition_number");
> * * * * * * * * XMLCh* coeff_ch * * * * =
> XMLString::transcode("coefficient");
> * * * * * * * * XMLCh* index_ch * * * * =
> XMLString::transcode("index");
> * * * * * * * * XMLCh* value_ch * * * * =
> XMLString::transcode("value");
> * * * * * * * * XMLCh* job_id_ch * * * *=
> XMLString::transcode("jobID");
>
> * * * * * * * * //printDCRD(results);
>
> * * * * * * * * //create a DOM
> * * * * * * * * DOMImplementation* impl =
> DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Range*"));
> * * * * * * * * DOMDocument* doc * * * *= impl->createDocument(0,
> XMLString::transcode("job_results"), 0);
>
> * * * * * * * * //document root
> * * * * * * * * root = doc->getDocumentElement();
>
> * * * * * * * * //root's job ID attribute
> * * * * * * * * job_id_attr * * = doc->createAttribute(job_id_ch);
>
> * * * * * * * * //add the job_id attribute to root tag
> * * * * * * * * char* job_buffer = new char[128];
> * * * * * * * * sprintf( job_buffer, "%i", job_id );
> * * * * * * * * XMLString::trim(job_buffer);
> * * * * * * * * job_id_attr->setValue(XMLString::transcode(job_buffer));
>
> * * * * * * * * root->setAttributeNode(job_id_attr);
> * * * * * * * * delete[] job_buffer;
>
> * * * * * * * * //for each data row
> * * * * * * * * for( int i=0; i<num_results; i++ )
> * * * * * * * * {
> * * * * * * * * * * * * data_row * * * *= doc->createElement(data_row_ch);
>
> * * * * * * * * * * * * sse_attr * * * *= doc->createAttribute(sse_ch);
>
> * * * * * * * * * * * * bin_rep_attr * *= doc->createAttribute(bin_rep_ch);
>
> * * * * * * * * * * * * def_num_attr * *= doc-
>
> >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 a per 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:
>
>
Code:

>
> struct REGRESSION_COEFFICIENTS
> {
> * * * * //which column are talking about
> * * * * int* * * * * * *index;
>
> * * * * //the value of the linear coefficient
> * * * * double* * * * * values;
>
> * * * * //the size of the struct
> * * * * unsigned int * *size;
>
> };
>
> ///A struct used to hold the client result data
> struct DDAS_CLIENT_RESULT_DATA
> {
> * * * * /// The binary representation of the definition number -
> serves to disambiguate endianess
> * * * * char** * * * * *bin_reps;
>
> * * * * /// The decimal representation of the combination of
> independent variables used in this regression (1011 base 2 == 11 base
> 10)
> * * * * char** * * * * *def_nums;
>
> * * * * /// The sum of squared error for the linear regression
> * * * * double* * * * * SSEs;
>
> * * * * /// How many results are contained in the struct
> * * * * unsigned int * size;
>
> * * * * //regression coefficients
> * * * * REGRESSION_COEFFICIENTS* coefficients;
>
> };
>
>

>
> And here is a sample of the output:
>
> [OUTPUT]
>
> * <data_row SSE="137.527403" binary_representation="1010111011111001"
> definition_number="44793">
> * * <coefficient index="0" value="-0.000977"/>
> * * <coefficient index="1" value="0.000000"/>
> * * <coefficient index="2" value="0.000000"/>
> * * <coefficient index="3" value="-66123751426.362999"/>
> * * <coefficient index="4" value="0.000088"/>
> * * <coefficient index="5" value="1095801473.097510"/>
> * * <coefficient index="6" value="0.003840"/>
> * * <coefficient index="7" value="-26494374893.985001"/>
> * * <coefficient index="8" value="0.000000"/>
> * * <coefficient index="9" value="0.097907"/>
> * * <coefficient index="10" value="0.004219"/>
> * * <coefficient index="11" value="66123751426.363098"/>
> * * <coefficient index="12" value="0.000000"/>
> * * <coefficient index="13" value="-1095801473.102500"/>
> * * <coefficient index="14" value="0.000000"/>
> * * <coefficient index="15" value="26494374894.009701"/>
> * </data_row>
>
> * <data_row SSE="137.533380" binary_representation=""
> definition_number="">
> * * <coefficient index="0" value="-0.001039"/>
> * * <coefficient index="1" value="0.097757"/>
> * * <coefficient index="2" value="758258573.171398"/>
> * * <coefficient index="3" value="-35123845436.044098"/>
> * * <coefficient index="4" value="0.000000"/>
> * * <coefficient index="5" value="0.000000"/>
> * * <coefficient index="6" value="-464164413.890403"/>
> * * <coefficient index="7" value="0.024555"/>
> * * <coefficient index="8" value="0.000000"/>
> * * <coefficient index="9" value="0.000000"/>
> * * <coefficient index="10" value="-758258573.167233"/>
> * * <coefficient index="11" value="35123845436.044197"/>
> * * <coefficient index="12" value="0.000016"/>
> * * <coefficient index="13" value="-0.004898"/>
> * * <coefficient index="14" value="464164413.894253"/>
> * * <coefficient index="15" value="0.000000"/>
> * </data_row>
>
> * <data_row SSE="137.533796" binary_representation="0111111011P>V"
> definition_number="32457">
> * * <coefficient index="0" value="-0.001034"/>
> * * <coefficient index="1" value="0.000000"/>
> * * <coefficient index="2" value="0.000000"/>
> * * <coefficient index="3" value="-35209041045.623802"/>
> * * <coefficient index="4" value="0.000000"/>
> * * <coefficient index="5" value="0.000000"/>
> * * <coefficient index="6" value="-425970878.520971"/>
> * * <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="35209041045.623802"/>
> * * <coefficient index="12" value="-0.000016"/>
> * * <coefficient index="13" value="-0.004899"/>
> * * <coefficient index="14" value="425970878.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_number 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?

Joseph J. Kesselman 05-12-2008 12:54 AM

Re: Xerces C++ Problem
 
> 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.)

mearvk 05-12-2008 07:18 AM

Re: Xerces C++ Problem
 
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.


All times are GMT. The time now is 12:00 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.