Hi,

I'm using xerces 2.2.0 and I have a little problem in read xml value with ascii value greater 127.

XML file example
-----------------------------

<?xml version="1.0" encoding="UTF-16"?>
<!-- TAPI configuration parameters -->
<!DOCTYPE doc [
<!ENTITY dirroot "/tms/RUNTIME/APP_WIND/HTS3/NORMALIZER/POP_WPOP/" >
<!ENTITY dircommoncfg "/tms/RUNTIME/APP_WIND/HTS3/NORMALIZER/cfg/" >
<!ENTITY dircfg "/tms/RUNTIME/APP_WIND/HTS3/NORMALIZER/POP_WPOP/cfg/" >
<!ENTITY concurrencecfg "/tms/RUNTIME/APP_WIND/HTS3/concurrence_cfg/" >]>
<ParamDefinition>


<ParamSection PSName="OUTPUT">
<ParamInfo PIName="OUTPUT_DIR" PIValue="&dirroot;output" PIComment="Output Directory" PIValidation="EXIST_DIR"/>
<ParamInfo PIName="FILE_RECORD_DESC" PIValue="&dircfg;ascii_POP_WPOP_output.xml" PIComment="xml decription record output file" PIValidation="EXIST_FILE"/>
<ParamInfo PIName="FIELD_SEPARATOR" PIValue="&#166;" PIComment="separator field char into output record" PIValidation="NOT_NULL"/>
</ParamSection>


</ParamDefinition>




The problem is in the attribute value PIValue="&#166;".
In HP-UX environment the parser works correctly.
In LINUX environment the parser dosen't work correctly. (The value readed is "" empty string).



The handler code of the SAX2 parser is about:

class XCP_CParserXmlData_ParamTableHandler : public DefaultHandler
{
void startElement( const XMLCh* const pobjURI, const XMLCh* const pobjLocalname, const XMLCh* const pobjQname, const Attributes& robjAttrs );
void endElement( const XMLCh* const pobjURI, const XMLCh* const pobjLocalname, const XMLCh* const pobjQname );
void endDocument( );
}



void XCP_CParserXmlData_ParamTableHandler::startElement(const XMLCh* const pobjURI
, const XMLCh* const pobjLocalname
, const XMLCh* const pobjQname
, const Attributes& robjAttrs)
{
XERCESUTIL_CXStr tobjXAttrName( );
XERCESUTIL_CXStr tobjXString( );


tobjXAttrName = XCP_TAG_PIVALUE;
tobjXString = robjAttrs.getValue( pobjURI, (const XMLCh *) tobjXAttrName );



}


XERCESUTIL_CXStr is a utility class that convert a const XMLCh * to string


I debugged both version (HP-UX and LINUX). In the first case (HP-UX) i saw that into tobjXString there was the correct value, in the second case into tobjXString there was empty string.


Why in LINUX environment it dosen't work?? What i miss??

I Hope that the informations are enough.

Thanks a lot
Best Regards
Gianmario


______________________________________

Tartaglione Gianmario

cell. : +39 348 5267783
Tel.  : +39 0187 599.603
Fax:  : +39 0187 563.634
e-mail: [EMAIL PROTECTED]


Delta Progetti 2000 S.r.l.
Sede Legale: Via Fontevivo 25, 19125 La Spezia
Italy
www.dp2000.it
_______________________________________



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to