secureswitools/swisistools/source/xmlparser/xmlparser.cpp
changeset 60 245df5276b97
parent 25 98b66e4fb0be
child 67 3a625661d1ce
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
    25 */
    25 */
    26 
    26 
    27 #include "xmlparser.h"
    27 #include "xmlparser.h"
    28 #include "logs.h"
    28 #include "logs.h"
    29 #include "exception.h"
    29 #include "exception.h"
       
    30 #include "utf8_wrapper.h"
    30 #include "util.h"
    31 #include "util.h"
    31 
    32 
    32 #include <xercesc/sax2/XMLReaderFactory.hpp>
    33 #include <xercesc/sax2/XMLReaderFactory.hpp>
    33 #include <xercesc/sax2/DefaultHandler.hpp>
    34 #include <xercesc/sax2/DefaultHandler.hpp>
    34 #include <xercesc/util/XMLString.hpp>
    35 #include <xercesc/util/XMLString.hpp>
    40 #include <vector>
    41 #include <vector>
    41 
    42 
    42 #include <memory>
    43 #include <memory>
    43 #include <cstdio>
    44 #include <cstdio>
    44 
    45 
       
    46 #ifndef _WIN32
       
    47 #include <ctype.h>
       
    48 
       
    49 //__ctype_b was removed from glibc. This is a workaround to fix the linking problem
       
    50 extern "C"
       
    51     {
       
    52     const unsigned short int** __ctype_b()
       
    53         {
       
    54         return __ctype_b_loc();
       
    55         }
       
    56     }
       
    57 
       
    58 #endif // _WIN32
       
    59 
    45 XERCES_CPP_NAMESPACE_USE
    60 XERCES_CPP_NAMESPACE_USE
       
    61 
       
    62 
       
    63 //------------------------------------------------------------------------------------------------------------------------------
       
    64 //											UTILITY FUNCTIONS
       
    65 //------------------------------------------------------------------------------------------------------------------------------
       
    66 int XercesStringToInteger(const XercesString& aWideStr)
       
    67 	{
       
    68 	int strLen = aWideStr.length();
       
    69 	const XMLCh* source = aWideStr.c_str();	
       
    70   char* buffer = new char[strLen << 2];
       
    71   
       
    72 	// Using a temp variable in place of buffer as ConvertUTF16toUTF8 modifies the source pointer passed.
       
    73 	char* temp = buffer;	
       
    74 	
       
    75 	ConvertUTF16toUTF8(&source, aWideStr.c_str() + strLen, &temp,  temp + (strLen << 2));
       
    76 	
       
    77 	// Appending NUL to the converted buffer.
       
    78 	*temp = 0;
       
    79 
       
    80 	int value = 0;
       
    81 	sscanf(buffer, "%d", &value);
       
    82 
       
    83 	delete[] buffer;
       
    84 	return value;
       
    85 	}
       
    86 
    46 
    87 
    47 // these function pointers are used to call appropriate release methods of XMLString
    88 // these function pointers are used to call appropriate release methods of XMLString
    48 // present in the xerces library. 
    89 // present in the xerces library. 
    49 typedef void (*releaseXmlChPtr) (XMLCh** buf);
    90 typedef void (*releaseXmlChPtr) (XMLCh** buf);
    50 typedef void (*releaseChPtr) (char** buf);
    91 typedef void (*releaseChPtr) (char** buf);
    51 
    92 
       
    93 #ifdef _WIN32
       
    94 
       
    95 // We need not do anything for WINDOWS, since XMLCh string(XercesString)
       
    96 // and WString both are same and will be in UTF-16 encoding format.
       
    97 #define XMLChToWString(aParameter) (aParameter)
       
    98 
       
    99 #else
       
   100 inline std::wstring XMLChToWString(const XercesString& aXercesString)
       
   101 	{
       
   102 	return XercesStringToWString (aXercesString);
       
   103 	}
       
   104 #endif // _WIN32
    52 
   105 
    53 
   106 
    54 DllExport CScrXmlParser::CScrXmlParser()
   107 DllExport CScrXmlParser::CScrXmlParser()
    55 	{}
   108 	{}
    56 
   109 
   257 	DOMNode* swTypeNamesRoot	= swTypeNames->item(0);
   310 	DOMNode* swTypeNamesRoot	= swTypeNames->item(0);
   258 	DOMElement* swTypeNamesNode = static_cast< xercesc::DOMElement* >( swTypeNamesRoot );
   311 	DOMElement* swTypeNamesNode = static_cast< xercesc::DOMElement* >( swTypeNamesRoot );
   259 	
   312 	
   260 	DOMNodeList* uniqueSwTypeName = swTypeNamesNode->getElementsByTagName(tagUniqueSoftwareTypeName.get());
   313 	DOMNodeList* uniqueSwTypeName = swTypeNamesNode->getElementsByTagName(tagUniqueSoftwareTypeName.get());
   261 	const XMLCh* textContent = uniqueSwTypeName->item(0)->getTextContent();
   314 	const XMLCh* textContent = uniqueSwTypeName->item(0)->getTextContent();
   262 	scrEnvDetails.iUniqueSoftwareTypeName = std::wstring(textContent);
   315 	scrEnvDetails.iUniqueSoftwareTypeName = XMLChToWString(textContent);
   263 	
   316 	
   264 	DOMNodeList* localizableSwTypeNames = swTypeNamesNode->getElementsByTagName(tagLocalizableSwTypeName.get());
   317 	DOMNodeList* localizableSwTypeNames = swTypeNamesNode->getElementsByTagName(tagLocalizableSwTypeName.get());
   265 	const  XMLSize_t localizableSwTypeNamesCount = localizableSwTypeNames->getLength();
   318 	const  XMLSize_t localizableSwTypeNamesCount = localizableSwTypeNames->getLength();
   266 	for( XMLSize_t count=0 ; count<localizableSwTypeNamesCount ; ++count )
   319 	for( XMLSize_t count=0 ; count<localizableSwTypeNamesCount ; ++count )
   267 		{
   320 		{
   282     if(0 != launcherExecutable->getLength())
   335     if(0 != launcherExecutable->getLength())
   283         {
   336         {
   284 		textContent = launcherExecutable->item(0)->getTextContent();
   337 		textContent = launcherExecutable->item(0)->getTextContent();
   285 		fn_auto_ptr<releaseXmlChPtr, XMLCh> launcherExecutableText( &XMLString::release,textContent );
   338 		fn_auto_ptr<releaseXmlChPtr, XMLCh> launcherExecutableText( &XMLString::release,textContent );
   286 		const XMLCh* launcherExecutableValue = launcherExecutableText.get();
   339 		const XMLCh* launcherExecutableValue = launcherExecutableText.get();
   287 		scrEnvDetails.iLauncherExecutable = launcherExecutableValue;
   340 		scrEnvDetails.iLauncherExecutable = XMLChToWString(launcherExecutableValue);
   288 		}
   341 		}
   289     DOMNodeList* customAcessList = aEnvironment->getElementsByTagName(tagCustomAcess.get());
   342     DOMNodeList* customAcessList = aEnvironment->getElementsByTagName(tagCustomAcess.get());
   290 	const  XMLSize_t customAcessDataCount = customAcessList->getLength();
   343 	const  XMLSize_t customAcessDataCount = customAcessList->getLength();
   291 	for( XMLSize_t count=0 ; count<customAcessDataCount ; ++count )
   344 	for( XMLSize_t count=0 ; count<customAcessDataCount ; ++count )
   292 		{
   345 		{
   302 	DOMNodeList* mimes = mimeDetailNode->getElementsByTagName(tagMIMEType.get());
   355 	DOMNodeList* mimes = mimeDetailNode->getElementsByTagName(tagMIMEType.get());
   303 	const  XMLSize_t mimeCount = mimes->getLength();
   356 	const  XMLSize_t mimeCount = mimes->getLength();
   304 	for( XMLSize_t count=0 ; count<mimeCount ; ++count )
   357 	for( XMLSize_t count=0 ; count<mimeCount ; ++count )
   305 		{
   358 		{
   306 		const XMLCh* textContent = mimes->item(count)->getTextContent();
   359 		const XMLCh* textContent = mimes->item(count)->getTextContent();
   307 		scrEnvDetails.iMIMEDetails.push_back(textContent);
   360 		std::wstring textString = XMLChToWString(textContent);
       
   361 		scrEnvDetails.iMIMEDetails.push_back(textString);
   308 		}
   362 		}
   309 			
   363 			
   310 	LOGEXIT("CScrXmlParser::GetEnvironmentData()");
   364 	LOGEXIT("CScrXmlParser::GetEnvironmentData()");
   311 	
   365 	
   312 	return scrEnvDetails;
   366 	return scrEnvDetails;
   347 		
   401 		
   348 		fn_auto_ptr<releaseXmlChPtr, XMLCh> tagSoftwareTypeName( &XMLString::release, XMLString::transcode("SoftwareTypeName") );
   402 		fn_auto_ptr<releaseXmlChPtr, XMLCh> tagSoftwareTypeName( &XMLString::release, XMLString::transcode("SoftwareTypeName") );
   349 	
   403 	
   350 		DOMNodeList* softwaretype = elementRoot->getElementsByTagName(tagSoftwareTypeName.get());
   404 		DOMNodeList* softwaretype = elementRoot->getElementsByTagName(tagSoftwareTypeName.get());
   351 		const XMLCh* textContent = softwaretype->item(0)->getTextContent();
   405 		const XMLCh* textContent = softwaretype->item(0)->getTextContent();
   352 		preProvisionDetail.iSoftwareTypeName = std::wstring(textContent);
   406 		preProvisionDetail.iSoftwareTypeName = XMLChToWString(textContent);
   353 	
   407 	
   354 		// Retrieve the nodes for Component.
   408 		// Retrieve the nodes for Component.
   355 		DOMNodeList* componentNodes = elementRoot->getElementsByTagName(tagComponent.get());
   409 		DOMNodeList* componentNodes = elementRoot->getElementsByTagName(tagComponent.get());
   356 		const  XMLSize_t nodeCount = componentNodes->getLength();
   410 		const  XMLSize_t nodeCount = componentNodes->getLength();
   357 		
   411 		
   453 	XmlDetails::TScrPreProvisionDetail::TComponentLocalizable componentLocalizable;
   507 	XmlDetails::TScrPreProvisionDetail::TComponentLocalizable componentLocalizable;
   454 
   508 
   455 	if(locale->getLength() != 0)
   509 	if(locale->getLength() != 0)
   456 		{
   510 		{
   457 		const XMLCh* textLocale = locale->item(0)->getTextContent();
   511 		const XMLCh* textLocale = locale->item(0)->getTextContent();
   458 		componentLocalizable.iLocale = Util::WideCharToInteger(textLocale);
   512 		componentLocalizable.iLocale = XercesStringToInteger(textLocale);
   459 		}
   513 		}
   460 	
   514 	
   461 	const XMLCh* textName = name->item(0)->getTextContent();
   515 	const XMLCh* textName = name->item(0)->getTextContent();
   462 	componentLocalizable.iName = textName;
   516 	componentLocalizable.iName = XMLChToWString(textName);
   463 
   517 
   464 	if(vendor->getLength() != 0)
   518 	if(vendor->getLength() != 0)
   465 		{
   519 		{
   466 		const XMLCh* textVendor = vendor->item(0)->getTextContent();
   520 		const XMLCh* textVendor = vendor->item(0)->getTextContent();
   467 		componentLocalizable.iVendor = textVendor;
   521 		componentLocalizable.iVendor = XMLChToWString(textVendor);
   468 		}
   522 		}
   469 	LOGEXIT("CScrXmlParser::GetComponentLocalizable()");
   523 	LOGEXIT("CScrXmlParser::GetComponentLocalizable()");
   470 	return componentLocalizable;
   524 	return componentLocalizable;
   471 	
   525 	
   472 	}
   526 	}
   493 	DOMNodeList* isBinary = aEnvironment->getElementsByTagName(tagComponentPropertyIsBinary.get());
   547 	DOMNodeList* isBinary = aEnvironment->getElementsByTagName(tagComponentPropertyIsBinary.get());
   494 	
   548 	
   495 	XmlDetails::TScrPreProvisionDetail::TComponentProperty componentProperty;
   549 	XmlDetails::TScrPreProvisionDetail::TComponentProperty componentProperty;
   496 	
   550 	
   497 	const XMLCh* textName = name->getTextContent();
   551 	const XMLCh* textName = name->getTextContent();
   498 	componentProperty.iName	= textName;
   552 	componentProperty.iName	= XMLChToWString(textName);
   499 	
   553 	
   500 	if(locale->getLength() != 0)
   554 	if(locale->getLength() != 0)
   501 		{
   555 		{
   502 		const XMLCh* textLocale = locale->item(0)->getTextContent();
   556 		const XMLCh* textLocale = locale->item(0)->getTextContent();
   503 		componentProperty.iLocale = Util::WideCharToInteger(textLocale);
   557 		componentProperty.iLocale = XercesStringToInteger(textLocale);
   504 		}
   558 		}
   505 
   559 
   506 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
   560 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
   507 	const XMLSize_t nodeCount = childNodes->getLength();
   561 	const XMLSize_t nodeCount = childNodes->getLength();
   508 
   562 
   510 		{
   564 		{
   511 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   565 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   512 		if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyIntValue.get()))
   566 		if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyIntValue.get()))
   513 			{
   567 			{
   514 			componentProperty.iIsIntValue = true;
   568 			componentProperty.iIsIntValue = true;
   515 			componentProperty.iValue = currentElement->getTextContent();
   569 			componentProperty.iValue = XMLChToWString(currentElement->getTextContent());
   516 			break;
   570 			break;
   517 			}
   571 			}
   518 		else if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyStrValue.get()))
   572 		else if( XMLString::equals(currentElement->getTagName(), tagComponentPropertyStrValue.get()))
   519 			{
   573 			{
   520 			componentProperty.iIsIntValue = false;
   574 			componentProperty.iIsIntValue = false;
   521 			componentProperty.iValue = currentElement->getTextContent();
   575 			componentProperty.iValue = XMLChToWString(currentElement->getTextContent());
   522 			break;
   576 			break;
   523 			}
   577 			}
   524 		}
   578 		}
   525 		
   579 		
   526 	if(isBinary->getLength() != 0)
   580 	if(isBinary->getLength() != 0)
   527 		{
   581 		{
   528 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
   582 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
   529 		componentProperty.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
   583 		componentProperty.iIsStr8Bit = XercesStringToInteger(textIsBinary);		
   530 		}
   584 		}
   531 	LOGEXIT("CScrXmlParser::GetComponentProperty()");
   585 	LOGEXIT("CScrXmlParser::GetComponentProperty()");
   532 	return componentProperty;
   586 	return componentProperty;
   533 	
   587 	
   534 	}
   588 	}
   554 		}
   608 		}
   555 	
   609 	
   556 	// attribute - location
   610 	// attribute - location
   557 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
   611 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
   558 	DOMNode* location = attributes->getNamedItem(tagLocation.get());
   612 	DOMNode* location = attributes->getNamedItem(tagLocation.get());
   559 	componentFile.iLocation = location->getTextContent();
   613 	componentFile.iLocation = XMLChToWString(location->getTextContent());
   560 	LOGEXIT("CScrXmlParser::GetComponentFile()");
   614 	LOGEXIT("CScrXmlParser::GetComponentFile()");
   561 	return componentFile;
   615 	return componentFile;
   562 	}
   616 	}
   563 
   617 
   564 XmlDetails::TScrPreProvisionDetail::TComponentDependency CScrXmlParser::GetComponentDependency( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement)
   618 XmlDetails::TScrPreProvisionDetail::TComponentDependency CScrXmlParser::GetComponentDependency( const XERCES_CPP_NAMESPACE::DOMElement* aDOMElement)
   581 		XmlDetails::TScrPreProvisionDetail::TComponentDependency::TComponentDependencyDetail componentDependencyDetail;
   635 		XmlDetails::TScrPreProvisionDetail::TComponentDependency::TComponentDependencyDetail componentDependencyDetail;
   582 		DOMElement* currentDepDetail = static_cast< xercesc::DOMElement* >( depList->item(index) );
   636 		DOMElement* currentDepDetail = static_cast< xercesc::DOMElement* >( depList->item(index) );
   583 		
   637 		
   584 		DOMNodeList* supplierId = currentDepDetail->getElementsByTagName(tagSupplierId.get());
   638 		DOMNodeList* supplierId = currentDepDetail->getElementsByTagName(tagSupplierId.get());
   585 		const XMLCh* textSupplierId = supplierId->item(0)->getTextContent();
   639 		const XMLCh* textSupplierId = supplierId->item(0)->getTextContent();
   586 		componentDependencyDetail.iSupplierId = std::wstring(textSupplierId);
   640 		componentDependencyDetail.iSupplierId = XMLChToWString(textSupplierId);
   587 		
   641 		
   588 		DOMNodeList* fromVersion = currentDepDetail->getElementsByTagName(tagFromVersion.get());
   642 		DOMNodeList* fromVersion = currentDepDetail->getElementsByTagName(tagFromVersion.get());
   589 		const XMLCh* textFromVersion = fromVersion->item(0)->getTextContent();
   643 		const XMLCh* textFromVersion = fromVersion->item(0)->getTextContent();
   590 		componentDependencyDetail.iFromVersion = std::wstring(textFromVersion);
   644 		componentDependencyDetail.iFromVersion = XMLChToWString(textFromVersion);
   591 
   645 
   592 		DOMNodeList* toVersion = currentDepDetail->getElementsByTagName(tagToVersion.get());
   646 		DOMNodeList* toVersion = currentDepDetail->getElementsByTagName(tagToVersion.get());
   593 		const XMLCh* textToVersion = toVersion->item(0)->getTextContent();
   647 		const XMLCh* textToVersion = toVersion->item(0)->getTextContent();
   594 		componentDependencyDetail.iToVersion = std::wstring(textToVersion);
   648 		componentDependencyDetail.iToVersion = XMLChToWString(textToVersion);
   595 
   649 
   596 		componentDependency.iComponentDependencyList.push_back(componentDependencyDetail);
   650 		componentDependency.iComponentDependencyList.push_back(componentDependencyDetail);
   597 		
   651 		
   598 		}
   652 		}
   599 	
   653 	
   600 	// attribute - location
   654 	// attribute - location
   601 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
   655 	DOMNamedNodeMap* attributes = aDOMElement->getAttributes();
   602 	DOMNode* dependentId = attributes->getNamedItem(tagDependentId.get());
   656 	DOMNode* dependentId = attributes->getNamedItem(tagDependentId.get());
   603 	componentDependency.iDependentId = dependentId->getTextContent();
   657 	componentDependency.iDependentId = XMLChToWString(dependentId->getTextContent());
   604 	LOGEXIT("CScrXmlParser::GetComponentDependency()");
   658 	LOGEXIT("CScrXmlParser::GetComponentDependency()");
   605 	return componentDependency;
   659 	return componentDependency;
   606 	}
   660 	}
   607 
   661 
   608 XmlDetails::TScrPreProvisionDetail::TComponentFile::TFileProperty 
   662 XmlDetails::TScrPreProvisionDetail::TComponentFile::TFileProperty 
   626 		
   680 		
   627 	DOMNodeList* value = aDOMElement->getElementsByTagName(tagFilePropertyValue.get());
   681 	DOMNodeList* value = aDOMElement->getElementsByTagName(tagFilePropertyValue.get());
   628 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagFilePropertyIsBinary.get());
   682 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagFilePropertyIsBinary.get());
   629 	
   683 	
   630 	const XMLCh* textName = name->getTextContent();
   684 	const XMLCh* textName = name->getTextContent();
   631 	fileProperty.iName	= textName;
   685 	fileProperty.iName	= XMLChToWString(textName);
   632 		
   686 		
   633 	int valueLength = value->getLength();
   687 	int valueLength = value->getLength();
   634 	if(valueLength != 0)
   688 	if(valueLength != 0)
   635 		{
   689 		{
   636 		for(int valIndex = 0; valIndex< valueLength; ++valIndex)
   690 		for(int valIndex = 0; valIndex< valueLength; ++valIndex)
   642 				{
   696 				{
   643 				DOMElement* valueElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   697 				DOMElement* valueElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   644 				if( XMLString::equals(valueElement->getTagName(), tagFilePropertyIntValue.get()))
   698 				if( XMLString::equals(valueElement->getTagName(), tagFilePropertyIntValue.get()))
   645 					{
   699 					{
   646 					fileProperty.iIsIntValue = true;
   700 					fileProperty.iIsIntValue = true;
   647 					fileProperty.iValue = currentElement->getTextContent();
   701 					fileProperty.iValue = XMLChToWString(currentElement->getTextContent());
   648 					}
   702 					}
   649 				else if( XMLString::equals(valueElement->getTagName(), tagFilePropertyStrValue.get()))
   703 				else if( XMLString::equals(valueElement->getTagName(), tagFilePropertyStrValue.get()))
   650 					{
   704 					{
   651 					fileProperty.iIsIntValue = false;
   705 					fileProperty.iIsIntValue = false;
   652 					fileProperty.iValue = currentElement->getTextContent();
   706 					fileProperty.iValue = XMLChToWString(currentElement->getTextContent());
   653 					}
   707 					}
   654 				}
   708 				}
   655 			}
   709 			}
   656 		}
   710 		}
   657 	LOGEXIT("CScrXmlParser::GetFileProperty()");
   711 	LOGEXIT("CScrXmlParser::GetFileProperty()");
   685 	
   739 	
   686 	if( romApplication->getLength() != 0)
   740 	if( romApplication->getLength() != 0)
   687 		{
   741 		{
   688 		LOGINFO("CScrXmlParser::GetComponentDetails()- rom app");
   742 		LOGINFO("CScrXmlParser::GetComponentDetails()- rom app");
   689 		const XMLCh* textRomApplication = romApplication->item(0)->getTextContent();
   743 		const XMLCh* textRomApplication = romApplication->item(0)->getTextContent();
   690 		componentDetails.iIsRomApplication = Util::WideCharToInteger(textRomApplication);
   744 		componentDetails.iIsRomApplication = XercesStringToInteger(textRomApplication);
   691 		}
   745 		}
   692 
   746 
   693 	if( removable->getLength() != 0)
   747 	if( removable->getLength() != 0)
   694 		{
   748 		{
   695 		const XMLCh* textRemovable = removable->item(0)->getTextContent();
   749 		const XMLCh* textRemovable = removable->item(0)->getTextContent();
   696 		componentDetails.iIsRemovable = Util::WideCharToInteger(textRemovable);
   750 		componentDetails.iIsRemovable = XercesStringToInteger(textRemovable);
   697 		}
   751 		}
   698 	
   752 	
   699 	if( size->getLength() != 0)
   753 	if( size->getLength() != 0)
   700 		{
   754 		{
   701 		const XMLCh* textSize = size->item(0)->getTextContent();
   755 		const XMLCh* textSize = size->item(0)->getTextContent();
   702 		componentDetails.iSize = Util::WideCharToInteger(textSize);
   756 		componentDetails.iSize = XercesStringToInteger(textSize);
   703 		}
   757 		}
   704 	
   758 	
   705 	if( scomoState->getLength() != 0)
   759 	if( scomoState->getLength() != 0)
   706 		{
   760 		{
   707 		const XMLCh* textScomoState = scomoState->item(0)->getTextContent();
   761 		const XMLCh* textScomoState = scomoState->item(0)->getTextContent();
   708 		componentDetails.iScomoState = Util::WideCharToInteger(textScomoState);
   762 		componentDetails.iScomoState = XercesStringToInteger(textScomoState);
   709 		}
   763 		}
   710 	
   764 	
   711 	if( globalId->getLength() != 0)
   765 	if( globalId->getLength() != 0)
   712 		{
   766 		{
   713 		const XMLCh* textGlobalId = globalId->item(0)->getTextContent();
   767 		const XMLCh* textGlobalId = globalId->item(0)->getTextContent();
   714 		componentDetails.iGlobalId = textGlobalId;
   768 		componentDetails.iGlobalId = XMLChToWString(textGlobalId);
   715 		}
   769 		}
   716 
   770 
   717 	if( versionDetail->getLength() != 0)
   771 	if( versionDetail->getLength() != 0)
   718 		{
   772 		{
   719 		// tags for Version
   773 		// tags for Version
   725 		DOMNamedNodeMap* attributes = versionElement->getAttributes();
   779 		DOMNamedNodeMap* attributes = versionElement->getAttributes();
   726 		DOMNode* major = attributes->getNamedItem(tagMajor.get());
   780 		DOMNode* major = attributes->getNamedItem(tagMajor.get());
   727 		DOMNode* minor = attributes->getNamedItem(tagMinor.get());
   781 		DOMNode* minor = attributes->getNamedItem(tagMinor.get());
   728 		DOMNode* build = attributes->getNamedItem(tagBuild.get());
   782 		DOMNode* build = attributes->getNamedItem(tagBuild.get());
   729 
   783 
   730 		componentDetails.iVersion.iMajor = major->getTextContent();
   784 		componentDetails.iVersion.iMajor = XMLChToWString(major->getTextContent());
   731 		componentDetails.iVersion.iMinor = minor->getTextContent();
   785 		componentDetails.iVersion.iMinor = XMLChToWString(minor->getTextContent());
   732 		componentDetails.iVersion.iBuild = build->getTextContent();
   786 		componentDetails.iVersion.iBuild = XMLChToWString(build->getTextContent());
   733 		}
   787 		}
   734 	
   788 	
   735 	if( originVerified->getLength() != 0)
   789 	if( originVerified->getLength() != 0)
   736 		{
   790 		{
   737 		const XMLCh* textOriginVerified = originVerified->item(0)->getTextContent();
   791 		const XMLCh* textOriginVerified = originVerified->item(0)->getTextContent();
   738 		componentDetails.iOriginVerified = Util::WideCharToInteger(textOriginVerified);
   792 		componentDetails.iOriginVerified = XercesStringToInteger(textOriginVerified);
   739 		}
   793 		}
   740 	
   794 	
   741 	if( hidden->getLength() != 0)
   795 	if( hidden->getLength() != 0)
   742 		{
   796 		{
   743 		const XMLCh* textHidden = hidden->item(0)->getTextContent();
   797 		const XMLCh* textHidden = hidden->item(0)->getTextContent();
   744 		componentDetails.iIsHidden = Util::WideCharToInteger(textHidden);
   798 		componentDetails.iIsHidden = XercesStringToInteger(textHidden);
   745 		}
   799 		}
   746 	LOGEXIT("CScrXmlParser::GetComponentDetails()");
   800 	LOGEXIT("CScrXmlParser::GetComponentDetails()");
   747 	return componentDetails;
   801 	return componentDetails;
   748 	}
   802 	}
   749 
   803 
   759 	DOMNode* name = attributes->getNamedItem(tagSwTypeNameValue.get());
   813 	DOMNode* name = attributes->getNamedItem(tagSwTypeNameValue.get());
   760 
   814 
   761 	XmlDetails::TScrEnvironmentDetails::TLocalizedSoftwareTypeName localizedSwTypeName;
   815 	XmlDetails::TScrEnvironmentDetails::TLocalizedSoftwareTypeName localizedSwTypeName;
   762 
   816 
   763 	const XMLCh* textLocale = locale->getTextContent();
   817 	const XMLCh* textLocale = locale->getTextContent();
   764 	localizedSwTypeName.iLocale = Util::WideCharToInteger(textLocale);
   818 	localizedSwTypeName.iLocale = XercesStringToInteger(textLocale);
   765 	
   819 	
   766 	const XMLCh* textName = name->getTextContent();
   820 	const XMLCh* textName = name->getTextContent();
   767 	localizedSwTypeName.iName = textName;
   821 	localizedSwTypeName.iName =  XMLChToWString(textName);
   768 	LOGEXIT("CScrXmlParser::GetLocalizedSoftwareTypeName()");
   822 	LOGEXIT("CScrXmlParser::GetLocalizedSoftwareTypeName()");
   769 	return localizedSwTypeName;
   823 	return localizedSwTypeName;
   770 	}
   824 	}
   771 
   825 
   772 XmlDetails::TScrEnvironmentDetails::TCustomAcessList 
   826 XmlDetails::TScrEnvironmentDetails::TCustomAcessList 
   786 	int secureIdVal=0;	
   840 	int secureIdVal=0;	
   787 	sscanf(textSecureId.get(),"%x",&secureIdVal);
   841 	sscanf(textSecureId.get(),"%x",&secureIdVal);
   788 	customAcessList.iSecureId = secureIdVal;
   842 	customAcessList.iSecureId = secureIdVal;
   789 	
   843 	
   790 	const XMLCh* textAccessMode = accessMode->getTextContent();
   844 	const XMLCh* textAccessMode = accessMode->getTextContent();
   791 	customAcessList.iAccessMode = Util::WideCharToInteger(textAccessMode);
   845 	customAcessList.iAccessMode = XercesStringToInteger(textAccessMode);
   792 	LOGEXIT("CScrXmlParser::GetCustomAcessList()");
   846 	LOGEXIT("CScrXmlParser::GetCustomAcessList()");
   793 	return customAcessList;
   847 	return customAcessList;
   794 	}
   848 	}
   795 
   849 
   796 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo CScrXmlParser::GetApplicationRegistrationInfo(const DOMElement* aDOMElement)
   850 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo CScrXmlParser::GetApplicationRegistrationInfo(const DOMElement* aDOMElement)
   838 		XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType = GetOpaqueDataType(currentOpaqueData);
   892 		XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType = GetOpaqueDataType(currentOpaqueData);
   839 
   893 
   840 		appProperty.iLocale = opaqueDataType.iLocale;
   894 		appProperty.iLocale = opaqueDataType.iLocale;
   841 		appProperty.iName = L"OpaqueData";
   895 		appProperty.iName = L"OpaqueData";
   842 		appProperty.iIntValue = 0;
   896 		appProperty.iIntValue = 0;
   843 		appProperty.iIsStr8Bit = true;
   897 		appProperty.iIsStr8Bit = opaqueDataType.iIsBinary;
   844 		appProperty.iServiceUid = 0;
   898 		appProperty.iServiceUid = 0;
   845 		appProperty.iStrValue = opaqueDataType.iOpaqueData;
   899 		appProperty.iStrValue = opaqueDataType.iOpaqueData;
   846 		
   900 		
   847 		appRegistrationInfo.iApplicationProperty.push_back(appProperty);
   901 		appRegistrationInfo.iApplicationProperty.push_back(appProperty);
   848 		}
   902 		}
   908 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagAppAttributeIsBinary.get());
   962 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagAppAttributeIsBinary.get());
   909 	
   963 	
   910 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppAttribute appAttribute;
   964 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppAttribute appAttribute;
   911 	
   965 	
   912 	const XMLCh* textName = name->getTextContent();
   966 	const XMLCh* textName = name->getTextContent();
   913 	appAttribute.iName	= textName;
   967 	appAttribute.iName	= XMLChToWString(textName);
   914 	
   968 	
   915 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
   969 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
   916 	const XMLSize_t nodeCount = childNodes->getLength();
   970 	const XMLSize_t nodeCount = childNodes->getLength();
   917 
   971 
   918 	for(int index = 0; index< nodeCount; ++index)
   972 	for(int index = 0; index< nodeCount; ++index)
   919 		{
   973 		{
   920 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   974 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
   921 		if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeIntValue.get()))
   975 		if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeIntValue.get()))
   922 			{
   976 			{
   923 			appAttribute.iIsIntValue = true;
   977 			appAttribute.iIsIntValue = true;
   924 			appAttribute.iValue = currentElement->getTextContent();
   978 			appAttribute.iValue = XMLChToWString(currentElement->getTextContent());
   925 			break;
   979 			break;
   926 			}
   980 			}
   927 		else if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeStrValue.get()))
   981 		else if( XMLString::equals(currentElement->getTagName(), tagApplicationAttributeStrValue.get()))
   928 			{
   982 			{
   929 			appAttribute.iIsIntValue = false;
   983 			appAttribute.iIsIntValue = false;
   930 			appAttribute.iValue = currentElement->getTextContent();
   984 			appAttribute.iValue = XMLChToWString(currentElement->getTextContent());
   931 			break;
   985 			break;
   932 			}
   986 			}
   933 		}
   987 		}
   934 		
   988 		
   935 	if(isBinary->getLength() != 0)
   989 	if(isBinary->getLength() != 0)
   936 		{
   990 		{
   937 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
   991 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
   938 		appAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
   992 		appAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
   939 		}
   993 		}
   940 	LOGEXIT("CScrXmlParser::GetAppAttribute()");
   994 	LOGEXIT("CScrXmlParser::GetAppAttribute()");
   941 	return appAttribute;
   995 	return appAttribute;
   942 	}
   996 	}
   943 
   997 
   952 	std::wstring file;
  1006 	std::wstring file;
   953 
  1007 
   954 	if( fileName->getLength() != 0)
  1008 	if( fileName->getLength() != 0)
   955 		{
  1009 		{
   956 		const XMLCh* fil = fileName->item(0)->getTextContent();
  1010 		const XMLCh* fil = fileName->item(0)->getTextContent();
   957 		file = fil;
  1011 		file = XMLChToWString(fil);
   958 		}
  1012 		}
   959 
  1013 
   960 	LOGEXIT("CScrXmlParser::GetFileOwnershipInfo()");
  1014 	LOGEXIT("CScrXmlParser::GetFileOwnershipInfo()");
   961 	return file;
  1015 	return file;
   962 	}
  1016 	}
   975 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TDataType dataType;
  1029 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TDataType dataType;
   976 
  1030 
   977 	if( priority->getLength() != 0)
  1031 	if( priority->getLength() != 0)
   978 		{
  1032 		{
   979 		const XMLCh* pri = priority->item(0)->getTextContent();
  1033 		const XMLCh* pri = priority->item(0)->getTextContent();
   980 		dataType.iPriority = Util::WideCharToInteger(pri);
  1034 		dataType.iPriority = XercesStringToInteger(pri);
   981 		}
  1035 		}
   982 
  1036 
   983 	if( type->getLength() != 0)
  1037 	if( type->getLength() != 0)
   984 		{
  1038 		{
   985 		const XMLCh* typ = type->item(0)->getTextContent();
  1039 		const XMLCh* typ = type->item(0)->getTextContent();
   986 		dataType.iType = typ;
  1040 		dataType.iType = XMLChToWString(typ);
   987 		}
  1041 		}
   988 	LOGEXIT("CScrXmlParser::GetDataType()");
  1042 	LOGEXIT("CScrXmlParser::GetDataType()");
   989 	return dataType;
  1043 	return dataType;
   990 	}
  1044 	}
   991 
  1045 
   994 	{
  1048 	{
   995 	LOGENTER("CScrXmlParser::GetOpaqueDataType()");
  1049 	LOGENTER("CScrXmlParser::GetOpaqueDataType()");
   996 	// tags in OpaqueDataType 
  1050 	// tags in OpaqueDataType 
   997 	fn_auto_ptr<releaseXmlChPtr, XMLCh> tagData( &XMLString::release, XMLString::transcode("Data") );
  1051 	fn_auto_ptr<releaseXmlChPtr, XMLCh> tagData( &XMLString::release, XMLString::transcode("Data") );
   998 	fn_auto_ptr<releaseXmlChPtr, XMLCh> tagOpaqueLocale( &XMLString::release, XMLString::transcode("OpaqueLocale") );
  1052 	fn_auto_ptr<releaseXmlChPtr, XMLCh> tagOpaqueLocale( &XMLString::release, XMLString::transcode("OpaqueLocale") );
       
  1053 	fn_auto_ptr<releaseXmlChPtr, XMLCh> tagIsBinary( &XMLString::release, XMLString::transcode("IsBinary") );
   999 
  1054 
  1000 	DOMNodeList* Data = aDOMElement->getElementsByTagName(tagData.get());
  1055 	DOMNodeList* Data = aDOMElement->getElementsByTagName(tagData.get());
  1001 	DOMNodeList* OpaqueLocale = aDOMElement->getElementsByTagName(tagOpaqueLocale.get());
  1056 	DOMNodeList* OpaqueLocale = aDOMElement->getElementsByTagName(tagOpaqueLocale.get());
       
  1057 	DOMNodeList* isBinary = aDOMElement->getElementsByTagName(tagIsBinary.get());
  1002 	
  1058 	
  1003 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType;
  1059 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType;
  1004 
  1060 
  1005 	if( OpaqueLocale->getLength() != 0)
  1061 	if( OpaqueLocale->getLength() != 0)
  1006 		{
  1062 		{
  1007 		const XMLCh* pri = OpaqueLocale->item(0)->getTextContent();
  1063 		const XMLCh* pri = OpaqueLocale->item(0)->getTextContent();
  1008 		opaqueDataType.iLocale = Util::WideCharToInteger(pri);
  1064 		opaqueDataType.iLocale = XercesStringToInteger(pri);
  1009 		}
  1065 		}
  1010 
  1066 
  1011 	if( Data->getLength() != 0)
  1067 	if( Data->getLength() != 0)
  1012 		{
  1068 		{
  1013 		const XMLCh* typ = Data->item(0)->getTextContent();
  1069 		const XMLCh* typ = Data->item(0)->getTextContent();
  1014 		opaqueDataType.iOpaqueData = typ;
  1070 		opaqueDataType.iOpaqueData = XMLChToWString(typ);
  1015 		}
  1071 		}
       
  1072 	
       
  1073 	if(isBinary->getLength() != 0)
       
  1074 		{
       
  1075 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
       
  1076 		opaqueDataType.iIsBinary = XercesStringToInteger(textIsBinary);		
       
  1077 		}
       
  1078 
  1016 	LOGEXIT("CScrXmlParser::GetOpaqueDataType()");
  1079 	LOGEXIT("CScrXmlParser::GetOpaqueDataType()");
  1017 	return opaqueDataType;
  1080 	return opaqueDataType;
  1018 	}
  1081 	}
  1019 
  1082 
  1020 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType 
  1083 XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType 
  1031 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType;
  1094 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType;
  1032 
  1095 
  1033 	if( ServiceOpaqueLocale->getLength() != 0)
  1096 	if( ServiceOpaqueLocale->getLength() != 0)
  1034 		{
  1097 		{
  1035 		const XMLCh* pri = ServiceOpaqueLocale->item(0)->getTextContent();
  1098 		const XMLCh* pri = ServiceOpaqueLocale->item(0)->getTextContent();
  1036 		opaqueDataType.iLocale = Util::WideCharToInteger(pri);
  1099 		opaqueDataType.iLocale = XercesStringToInteger(pri);
  1037 		}
  1100 		}
  1038 
  1101 
  1039 	if( ServiceData->getLength() != 0)
  1102 	if( ServiceData->getLength() != 0)
  1040 		{
  1103 		{
  1041 		const XMLCh* typ = ServiceData->item(0)->getTextContent();
  1104 		const XMLCh* typ = ServiceData->item(0)->getTextContent();
  1042 		opaqueDataType.iOpaqueData = typ;
  1105 		opaqueDataType.iOpaqueData = XMLChToWString(typ);
  1043 		}
  1106 		}
  1044 	LOGEXIT("CScrXmlParser::GetServiceOpaqueDataType()");
  1107 	LOGEXIT("CScrXmlParser::GetServiceOpaqueDataType()");
  1045 	return opaqueDataType;
  1108 	return opaqueDataType;
  1046 	}
  1109 	}
  1047 
  1110 
  1065 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppServiceInfo appServiceInfo;
  1128 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppServiceInfo appServiceInfo;
  1066 
  1129 
  1067 	if( uid->getLength() != 0)
  1130 	if( uid->getLength() != 0)
  1068 		{
  1131 		{
  1069 		const XMLCh* priority = uid->item(0)->getTextContent();
  1132 		const XMLCh* priority = uid->item(0)->getTextContent();
  1070 		appServiceInfo.iUid = Util::WideCharToInteger(priority);
  1133 		appServiceInfo.iUid = XercesStringToInteger(priority);
  1071 		}
  1134 		}
  1072 
  1135 
  1073 	// for each OpaqueData retrieve all tags
  1136 	// for each OpaqueData retrieve all tags
  1074 	for( XMLSize_t index = 0; index < ServiceOpaqueDataCount; ++index )
  1137 	for( XMLSize_t index = 0; index < ServiceOpaqueDataCount; ++index )
  1075 		{
  1138 		{
  1079 		XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType = GetServiceOpaqueDataType(currentOpaqueData);
  1142 		XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TOpaqueDataType opaqueDataType = GetServiceOpaqueDataType(currentOpaqueData);
  1080 
  1143 
  1081 		appProperty.iLocale = opaqueDataType.iLocale;
  1144 		appProperty.iLocale = opaqueDataType.iLocale;
  1082 		appProperty.iName = L"OpaqueData";
  1145 		appProperty.iName = L"OpaqueData";
  1083 		appProperty.iIntValue = 0;
  1146 		appProperty.iIntValue = 0;
  1084 		appProperty.iIsStr8Bit = true;
  1147 		appProperty.iIsStr8Bit = opaqueDataType.iIsBinary;
  1085 		appProperty.iServiceUid = appServiceInfo.iUid;
  1148 		appProperty.iServiceUid = appServiceInfo.iUid;
  1086 		appProperty.iStrValue = opaqueDataType.iOpaqueData;
  1149 		appProperty.iStrValue = opaqueDataType.iOpaqueData;
  1087 		
  1150 		
  1088 		aAppRegistrationInfo.iApplicationProperty.push_back(appProperty);
  1151 		aAppRegistrationInfo.iApplicationProperty.push_back(appProperty);
  1089 		}
  1152 		}
  1164 	
  1227 	
  1165 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppLocalizableInfo::TLocalizableAttribute appLocalizableAttribute;
  1228 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppLocalizableInfo::TLocalizableAttribute appLocalizableAttribute;
  1166 	
  1229 	
  1167 	LOGINFO("name->getTextContent");
  1230 	LOGINFO("name->getTextContent");
  1168 	const XMLCh* textName = name->getTextContent();
  1231 	const XMLCh* textName = name->getTextContent();
  1169 	appLocalizableAttribute.iName = textName;
  1232 	appLocalizableAttribute.iName = XMLChToWString(textName);
  1170 	
  1233 	
  1171 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
  1234 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
  1172 	const XMLSize_t nodeCount = childNodes->getLength();
  1235 	const XMLSize_t nodeCount = childNodes->getLength();
  1173 
  1236 
  1174 	for(int index = 0; index< nodeCount; ++index)
  1237 	for(int index = 0; index< nodeCount; ++index)
  1175 		{
  1238 		{
  1176 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
  1239 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
  1177 		if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeIntValue.get()))
  1240 		if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeIntValue.get()))
  1178 			{
  1241 			{
  1179 			appLocalizableAttribute.iIsIntValue = true;
  1242 			appLocalizableAttribute.iIsIntValue = true;
  1180 			appLocalizableAttribute.iValue = currentElement->getTextContent();
  1243 			appLocalizableAttribute.iValue = XMLChToWString(currentElement->getTextContent());
  1181 			break;
  1244 			break;
  1182 			}
  1245 			}
  1183 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeStrValue.get()))
  1246 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableInfoAttributeStrValue.get()))
  1184 			{
  1247 			{
  1185 			appLocalizableAttribute.iIsIntValue = false;
  1248 			appLocalizableAttribute.iIsIntValue = false;
  1186 			appLocalizableAttribute.iValue = currentElement->getTextContent();
  1249 			appLocalizableAttribute.iValue = XMLChToWString(currentElement->getTextContent());
  1187 			break;
  1250 			break;
  1188 			}
  1251 			}
  1189 		}
  1252 		}
  1190 		
  1253 		
  1191 	if(isBinary->getLength() != 0)
  1254 	if(isBinary->getLength() != 0)
  1192 		{
  1255 		{
  1193 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
  1256 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
  1194 		appLocalizableAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
  1257 		appLocalizableAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
  1195 		}
  1258 		}
  1196 
  1259 
  1197 	LOGEXIT("CScrXmlParser::GetAppLocalizableAttribute()");
  1260 	LOGEXIT("CScrXmlParser::GetAppLocalizableAttribute()");
  1198 	return appLocalizableAttribute;
  1261 	return appLocalizableAttribute;
  1199 	}
  1262 	}
  1245 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppLocalizableInfo::TViewData::TViewDataAttributes appLocalizableViewDataAttribute;
  1308 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppLocalizableInfo::TViewData::TViewDataAttributes appLocalizableViewDataAttribute;
  1246 	
  1309 	
  1247 	LOGINFO("name->getTextContent");
  1310 	LOGINFO("name->getTextContent");
  1248 	const XMLCh* textName = name->getTextContent();
  1311 	const XMLCh* textName = name->getTextContent();
  1249 	LOGINFO("assign name");
  1312 	LOGINFO("assign name");
  1250 	appLocalizableViewDataAttribute.iName = textName;
  1313 	appLocalizableViewDataAttribute.iName = XMLChToWString(textName);
  1251 
  1314 
  1252 	LOGINFO("getChildNodes()");
  1315 	LOGINFO("getChildNodes()");
  1253 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
  1316 	DOMNodeList* childNodes = value->item(0)->getChildNodes();
  1254 	LOGINFO("childNodes->getLength()");
  1317 	LOGINFO("childNodes->getLength()");
  1255 	const XMLSize_t nodeCount = childNodes->getLength();
  1318 	const XMLSize_t nodeCount = childNodes->getLength();
  1259 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
  1322 		DOMElement* currentElement = static_cast< xercesc::DOMElement* >( childNodes->item(index) );
  1260 		if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableViewDataIntValue.get()))
  1323 		if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableViewDataIntValue.get()))
  1261 			{
  1324 			{
  1262 			LOGINFO("int value");
  1325 			LOGINFO("int value");
  1263 			appLocalizableViewDataAttribute.iIsIntValue = true;
  1326 			appLocalizableViewDataAttribute.iIsIntValue = true;
  1264 			appLocalizableViewDataAttribute.iValue = currentElement->getTextContent();
  1327 			appLocalizableViewDataAttribute.iValue = XMLChToWString(currentElement->getTextContent());
  1265 			break;
  1328 			break;
  1266 			}
  1329 			}
  1267 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableViewDataStrValue.get()))
  1330 		else if( XMLString::equals(currentElement->getTagName(), tagAppLocalizableViewDataStrValue.get()))
  1268 			{
  1331 			{
  1269 			LOGINFO("str value");
  1332 			LOGINFO("str value");
  1270 			appLocalizableViewDataAttribute.iIsIntValue = false;
  1333 			appLocalizableViewDataAttribute.iIsIntValue = false;
  1271 			appLocalizableViewDataAttribute.iValue = currentElement->getTextContent();
  1334 			appLocalizableViewDataAttribute.iValue = XMLChToWString(currentElement->getTextContent());
  1272 			break;
  1335 			break;
  1273 			}
  1336 			}
  1274 		}
  1337 		}
  1275 		
  1338 		
  1276 	if(isBinary->getLength() != 0)
  1339 	if(isBinary->getLength() != 0)
  1277 		{
  1340 		{
  1278 		LOGINFO("bin value");
  1341 		LOGINFO("bin value");
  1279 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
  1342 		const XMLCh* textIsBinary = isBinary->item(0)->getTextContent();
  1280 		appLocalizableViewDataAttribute.iIsStr8Bit = Util::WideCharToInteger(textIsBinary);		
  1343 		appLocalizableViewDataAttribute.iIsStr8Bit = XercesStringToInteger(textIsBinary);
  1281 		}
  1344 		}
  1282 	LOGEXIT("CScrXmlParser::GetAppLocalizableViewDataAttributes()");
  1345 	LOGEXIT("CScrXmlParser::GetAppLocalizableViewDataAttributes()");
  1283 	return appLocalizableViewDataAttribute;
  1346 	return appLocalizableViewDataAttribute;
  1284 	}
  1347 	}
  1285 
  1348 
  1302 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppProperty appProperty;
  1365 	XmlDetails::TScrPreProvisionDetail::TApplicationRegistrationInfo::TAppProperty appProperty;
  1303 
  1366 
  1304 	if( locale->getLength() != 0)
  1367 	if( locale->getLength() != 0)
  1305 		{
  1368 		{
  1306 		const XMLCh* loc = locale->item(0)->getTextContent();
  1369 		const XMLCh* loc = locale->item(0)->getTextContent();
  1307 		appProperty.iLocale = Util::WideCharToInteger(loc);
  1370 		appProperty.iLocale = XercesStringToInteger(loc);
  1308 		}
  1371 		}
  1309 
  1372 
  1310 	if( name->getLength() != 0)
  1373 	if( name->getLength() != 0)
  1311 		{
  1374 		{
  1312 		const XMLCh* nam = name->item(0)->getTextContent();
  1375 		const XMLCh* nam = name->item(0)->getTextContent();
  1313 		appProperty.iName = nam;
  1376 		appProperty.iName = XMLChToWString(nam);
  1314 		}
  1377 		}
  1315 	
  1378 	
  1316 	if( intvalue->getLength() != 0)
  1379 	if( intvalue->getLength() != 0)
  1317 		{
  1380 		{
  1318 		const XMLCh* intval = intvalue->item(0)->getTextContent();
  1381 		const XMLCh* intval = intvalue->item(0)->getTextContent();
  1319 		appProperty.iIntValue = Util::WideCharToInteger(intval);
  1382 		appProperty.iIntValue = XercesStringToInteger(intval);
  1320 		}
  1383 		}
  1321 
  1384 
  1322 	if( strvalue->getLength() != 0)
  1385 	if( strvalue->getLength() != 0)
  1323 		{
  1386 		{
  1324 		const XMLCh* strval = strvalue->item(0)->getTextContent();
  1387 		const XMLCh* strval = strvalue->item(0)->getTextContent();
  1325 		appProperty.iStrValue = strval;
  1388 		appProperty.iStrValue = XMLChToWString(strval);
  1326 		}
  1389 		}
  1327 	LOGEXIT("CScrXmlParser::GetAppProperty()");
  1390 	LOGEXIT("CScrXmlParser::GetAppProperty()");
  1328 	return appProperty;
  1391 	return appProperty;
  1329 	}
  1392 	}
  1330 
  1393 
  1372 void SchemaErrorHandler::resetErrors ()
  1435 void SchemaErrorHandler::resetErrors ()
  1373 	{
  1436 	{
  1374 	std::string msg( "Resetting error handler object" );
  1437 	std::string msg( "Resetting error handler object" );
  1375 	LOGINFO(msg);
  1438 	LOGINFO(msg);
  1376 	}
  1439 	}
       
  1440 
       
  1441