469,361 Members | 2,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

How to use Tinyxml for G85 wafermap to C?

3
Anyone have an idea how to use tinyxml for G85 wafermap to C?
Expand|Select|Wrap|Line Numbers
  1. <?xml version='1.0' encoding='utf-8'?>
  2. - <Maps>
  3. - <Map xmlns="http://www.semi.org" SubstrateId="123456705F2" SubstrateType="Wafer"
  4. FormatRevision="SEMI G85-0703">
  5. - <Device Rows="35" LotId="1234567.111" BinType="ASCII" Columns="40" MapType="Array"
  6. NullBin="0" ProductId="MT*" WaferSize="200" CreateDate="20050117093925000" DeviceSizeX="4800.60"
  7. DeviceSizeY="5484.12" MicronLotId="1234567.111" Orientation="0" SupplierName="Micron Technology,
  8. Inc." OriginLocation="2">
  9. <ReferenceDevice ReferenceDeviceX="27" ReferenceDeviceY="34"/>
  10. <Bin BinCode="G" BinCount="830" BinQuality="Pass"/>
  11. <Bin BinCode="X" BinCount="255" BinQuality="Fail"/>
  12. - <Data>
  13. -<Row><![CDATA[00000000000000XXXXGXXGGGXX00000000000000]]></Row>
  14. -<Row><![CDATA[000000000000XXXGGXXGXGGXGGGX000000000000]]></Row>
  15. -<Row><![CDATA[0000000000XGXGGGGGGGGXXXGGGGGX0000000000]]></Row>
  16. -<Row><![CDATA[00000000GGGGGXGGGGGXGXGGGGGXGGXX00000000]]></Row>
  17. -<Row><![CDATA[000000XGXGGGGGGGGGGGGGGGGGGGGGGGG0000000]]></Row>
  18. -<Row><![CDATA[00000XXXGXXXGGGGGGGGXXGGGXGGGGGGGGX00000]]></Row>
  19. -<Row><![CDATA[0000XXGGGGGGGGGGGGGGGGGGGGGGGGGGGGX00000]]></Row>
  20. -<Row><![CDATA[0000GGGGGXGGGGGGGGGGGGGGXGGGXGGGGGGX0000]]></Row>
  21. -<Row><![CDATA[000GGGGGGGGGGGGGGGGGGGGGGXGGGGGXGGXGX000]]></Row>
  22. -<Row><![CDATA[00XXGGGGXGGXGGGGGGGXGGGGGXXGGGGGGXXGGX00]]></Row>
  23. -<Row><![CDATA[00GGGGGGXGXGGGGGGGGGGGGGGGGXXGGXGGGGGG00]]></Row>
  24. -<Row><![CDATA[0XGGGGXGGXGGXGGGGGGGGGGGGGGGGGGGGGGGGGX0]]></Row>
  25. -<Row><![CDATA[0GGGXXGGGXXXGGGGGGGGGGGGGGXGGXGGGXXGGGX0]]></Row>
  26. -<Row><![CDATA[0XGGGGGGGGGXGGGGGGGGGXGGGGXXGGGGGGGGGGG0]]></Row>
  27. -<Row><![CDATA[XGGGGGGGGGGXGGGXGGXGGGGGXGXXGGGGGGGGXGGX]]></Row>
  28. -<Row><![CDATA[XGGGGGGGXGXXGGGGGGGGGGGGGGXGGXGGGXGGXGGX]]></Row>
  29. -<Row><![CDATA[XGGGGGGXXGGXGGGGGGGXXGGGXGGXGXXGGXGXXGGX]]></Row>
  30. -<Row><![CDATA[XGXGGGGGXGXXXXGGGGGXXGGGXXXXXXXGXGGGGGGX]]></Row>
  31. -<Row><![CDATA[XGGGXGGGGGXGGGGGGGGGXGGGXXGGGXXGGGGGGGGX]]></Row>
  32. -<Row><![CDATA[XGXGXGGGGGGXGGGXGGGGGGXGGGGGXXGGGGGGGGGX]]></Row>
  33. -<Row><![CDATA[XGGGGGGGXXGGGGGGXGGXGGGXGGGGXGGGGGGGGXGX]]></Row>
  34. -<Row><![CDATA[0GXGGGGGGGGGGGGGXGGGGGGGGGGGGGGXGGGGGGG0]]></Row>
  35. -<Row><![CDATA[0GXGGGGGGGGGGGGGGGGGGXGGGGGGXXGXGXGGGGX0]]></Row>
  36. -<Row><![CDATA[0XXGGGGGGGGGGGXGGGGGGGGGGGGGGGXXGGGXGG00]]></Row>
  37. -<Row><![CDATA[00GGGGGGGGGGGGGGGGGGGGXGGGXGGGXGGGGGGX00]]></Row>
  38. -<Row><![CDATA[000GGGGGGGGGGGGGGGXGGGGGGXGGGGXGXGGGG000]]></Row>
  39. -<Row><![CDATA[000XGGGGXGGGGGGGGGGGGXGGGGGGGGGXGGGGX000]]></Row>
  40. -<Row><![CDATA[00000XGGGGGGGGGGGGGGXXGGGGGGXXXGGGXX0000]]></Row>
  41. -<Row><![CDATA[00000XGGGGGGXXGGGGGGGGGGGXGXGGGXXGX00000]]></Row>
  42. -<Row><![CDATA[000000GGGXGGGGGGGGGGXXGGGGGXXGGXXX000000]]></Row>
  43. -<Row><![CDATA[0000000XXGGGGGGGGGGGXGGXGGXXXGXGX0000000]]></Row>
  44. -<Row><![CDATA[000000000GGGGXXGXGGGGGGGGGXGGXX000000000]]></Row>
  45. -<Row><![CDATA[00000000000XXXGGGGGGGGXXGGXGXX0000000000]]></Row>
  46. -<Row><![CDATA[0000000000000XXGGGXXXXGXXXX0000000000000]]></Row>
  47. -<Row><![CDATA[0000000000000000XXXXXXX00000000000000000]]></Row>
  48. </Data>
  49. </Device>
  50. </Map>
  51. </Maps>
  52.  
Jun 15 '10 #1
3 5631
thyeun
3
Expand|Select|Wrap|Line Numbers
  1. bool G85MapParser::ReadHeaderData()
  2. {
  3.         CString csFormatRevision;
  4.         CString csRow;
  5.         CString csBintype;
  6.  
  7.         TiXmlElement *pRoot, *pDevice, *pMap, *pData, *pRow;
  8.         TiXmlText *pRowData;
  9.         TiXmlAttribute *pFormatRevision, *pwaferId, *psubstrateId, *pLotId, *pOrientation, *pFrameId, *pRows, *pColumns, *pOriginLocation, *pNullBin, *pBinType, *pBinQuality, *pBinCode, *pReference, *pBin; 
  10.  
  11.         pRoot = m_pXMLFile->RootElement(); //maps
  12.         if ( pRoot!=NULL && (m_pNode=pRoot->FirstChild("Maps"))!=NULL )
  13.         {
  14.             pMap = pRoot->FirstChildElement("Map");
  15.             while (pMap)
  16.             {
  17.                 pFormatRevision = pMap->FirstAttribute();
  18.                 if (pFormatRevision)
  19.                 {    
  20.                     csFormatRevision = pFormatRevision->Value();
  21.                     if (csFormatRevision == "SEMI G85-1101")
  22.                     {
  23.                         pwaferId = pMap->FirstAttribute();
  24.                         pwaferId->Value();
  25.                     }
  26.                     else 
  27.                     {    if (csFormatRevision == "SEMI G85-0703")
  28.                         {
  29.                             psubstrateId = pMap->FirstAttribute();
  30.                             psubstrateId->Value();
  31.                             pwaferId = pMap->FirstAttribute();
  32.                             if (pwaferId)
  33.                             {
  34.                                 pwaferId->Value();
  35.                                 //pwaferId->GetNewObject(pwaferId);
  36.                             }
  37.                         }
  38.                     }
  39.                     //pFormatRevision->GetNewObject(pFormatRevision);
  40.                 }
  41.  
  42.                 pDevice = pMap->FirstChildElement("Device");
  43.                 while (pDevice)
  44.                 {
  45.                     pLotId = pDevice->FirstAttribute();
  46.                     if (pLotId)
  47.                     {
  48.                         pLotId->Value();
  49.                         //pLotId->GetNewObject(pLotId);
  50.                     }
  51.  
  52.                     pOrientation = pDevice->FirstAttribute();
  53.                     if (pOrientation)
  54.                     {
  55.                         pOrientation->Value();
  56.                         //pOrientation->GetNewObject(pOrientation);
  57.                     }
  58.  
  59.                     pFrameId = pDevice->FirstAttribute();
  60.                     if (pFrameId)
  61.                     {
  62.                         pFrameId->Value();
  63.                         //pFrameId->GetNewObject(pFrameId);
  64.                     }
  65.  
  66.                     pRows = pDevice->FirstAttribute();
  67.                     if (pRows)
  68.                     {
  69.                         pRows->Value();
  70.                         //pRows->GetNewObject(pRows);
  71.                     }
  72.  
  73.                     pReference = pDevice->FirstAttribute();
  74.                     if (pReference)
  75.                         {
  76.                             pReference->Value();
  77.                         }
  78.  
  79.                     pBin = pDevice->FirstAttribute();
  80.                     if (pBin)
  81.                     {
  82.                         pBin->Value();
  83.                     }
  84.  
  85.                     pColumns = pDevice->FirstAttribute();
  86.                     if (pColumns)
  87.                     {
  88.                         pColumns->Value();
  89.                         //pColumns->GetNewObject(pColumns);
  90.                     }
  91.  
  92.                     pOriginLocation = pDevice->FirstAttribute();
  93.                     if (pOriginLocation)
  94.                     {
  95.                         pOriginLocation->Value();
  96.                         //pOriginLocation->GetNewObject(pOriginLocation);
  97.                     }
  98.  
  99.  
  100.                     pNullBin = pDevice->FirstAttribute();
  101.                     if (pNullBin)
  102.                     {
  103.                         pNullBin->Value();
  104.                         //pNullBin->GetNewObject(pNullBin);
  105.                     }
  106.  
  107.                     pBinType = pDevice->FirstAttribute();
  108.                     if (pBinType)
  109.                     {
  110.                         csBintype = pBinType->Value();
  111.                         if (csBintype = "HEXADECIMAL")
  112.                         {
  113.                             m_BCType = BC_HEX;
  114.                             m_pXMLFile->LoadDocument(m_MapFile.buffer());
  115.                         }
  116.                         else 
  117.                         {
  118.                             if (csBintype = "DECIMAL")
  119.                             {
  120.                                 m_BCType = BC_DEC;
  121.                                 m_pXMLFile->LoadDocument(m_MapFile.buffer());
  122.                             }
  123.                             else
  124.                             {
  125.                                 SetError("wrong file name");
  126.                             }
  127.  
  128.                             SetError("wrong file name");
  129.                         }
  130.  
  131.                         //pBinType->GetNewObject(pBinType);
  132.                     }
  133.  
  134.                     pBinQuality = pDevice->FirstAttribute();
  135.                     if (pBinQuality)
  136.                     {
  137.                         pBinQuality->Value();
  138.                         pBinCode = pDevice->FirstAttribute();
  139.                         //pBinQuality = pDevice->GetNewObject(pBinQuality);
  140.                         break;
  141.                     }
  142.  
  143.                     pData = pDevice->FirstChildElement("Data");
  144.                     pRow = NULL;
  145.                     pRowData = NULL;
  146.                     while(pRow = pData->FirstChildElement("Row"))
  147.                     {
  148.                         pRowData = pRow->FirstChild()->ToText();
  149.                         if ( pRowData )
  150.                         {
  151.                             pRowData->SetCDATA(false);
  152.                             csRow = pRowData->Value();
  153.                         }
  154.                     }
  155.         }
  156.     }
  157. }
  158.  
  159.     else
  160.     {
  161.         SetError("Parsing error: 6", APARS_ERR_PARSERR, "1 6");
  162.         return false;
  163.     }
  164.  
  165.     return true;
  166. }
can i write it like that
Jun 22 '10 #2
jkmyoung
2,057 Expert 2GB
What is this "G85 wafermap" you speak of? Spec?
Jun 22 '10 #3
thyeun
3
@jkmyoung
G85 = a standard of SEMI (semiconductor industry)

so G85 wafermap = a map that use for a wafer to pick-up a die and this file is based on an extension *.xml

so, what i need is, i need to make this *.xml file into a parser that write in C/C++
Jun 22 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Rui Maciel | last post: by
1 post views Thread by Singee15 | last post: by
3 posts views Thread by Singee15 | last post: by
Meetee
reply views Thread by Meetee | last post: by
reply views Thread by thomas.frendo | last post: by
4 posts views Thread by mamid | last post: by
Meetee
7 posts views Thread by Meetee | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.