• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Peculiar Problem while parsing xml file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I am getting a peculiar problem while parsing the CDATA. Below is the node from where I get the problem:

part of the xml file to be parsed
<Category name="WorkOrder" migrate="true">
<SelectQuery>
<![CDATA[SELECT ITS.WOR_ID, SC.SER_ID, TO_CHAR(ITS.REG_CREATED, 'DD-MM-YYYY HH24:MI:SS'), WOR_DESCRIPTION, TO_CHAR(WOR_ACTUALSTART, 'DD-MM-YYYY HH24:MI:SS'), TO_CHAR(WOR_ACTUALFINISH,'DD-MM-YYYY HH24:MI:SS'), CAT.RCT_NAME, PRI.CDL_NAME, IMP.CDL_NAME, CLO.CDL_NAME, ORG_NAME1, VENDOR_TYPE.CDL_NAME, (SELECT SUBSTR(SYS_CONNECT_BY_PATH(ORG1.ORG_NAME1, '=='), 3, LENGTH (SYS_CONNECT_BY_PATH(ORG1.ORG_NAME1, '=='))) FROM SERVICEDESK.ITSM_ORGANIZATIONS ORG1 WHERE ORG1.ORG_OID = ITS.ASS_CONTR_OUT_ORG START WITH ORG1.ORG_PARENT IS NULL CONNECT BY PRIOR ORG1.ORG_OID = ORG1.ORG_PARENT AND ORG1.ORG_OID = ITS.ASS_CONTR_OUT_ORG) PATH FROM SERVICEDESKREPO.REP_CODES_TEXT STATUS, SERVICEDESKREPO.REP_CODES_TEXT FOLD, SERVICEDESKREPO.REP_CODES_TEXT CAT, SERVICEDESKREPO.ITSM_CODES_LOCALE PRI, SERVICEDESKREPO.ITSM_CODES_LOCALE IMP, SERVICEDESKREPO.ITSM_CODES_LOCALE CLO, SERVICEDESK.ITSM_WORKORDERS ITS, SERVICEDESK.ITSM_SERVICECALLS SC, SERVICEDESK.ITSM_WOR_CUSTOM_FIELDS CF, SERVICEDESKREPO.ITSM_CODES_LOCALE VENDOR_TYPE, SERVICEDESK.ITSM_ORGANIZATIONS ORG WHERE ORG_OID = ASS_CONTR_OUT_ORG AND WOR_OID = CF.WCF_WOR_OID AND CF.WCF_COD5_OID = VENDOR_TYPE.CDL_OID AND WOR_SER_OID = SC.SER_OID AND ITS.WOR_STA_OID = STATUS.RCT_RCD_OID AND ITS.WOR_CAT_OID = CAT.RCT_RCD_OID AND ITS.WOR_PRI_OID = PRI.CDL_COD_OID AND ITS.WOR_POO_OID = FOLD.RCT_RCD_OID AND ITS.WOR_IMP_OID = IMP.CDL_COD_OID AND ITS.WOR_CLO_OID = CLO.CDL_COD_OID AND (STATUS.RCT_NAME = 'Closed' OR STATUS.RCT_NAME = 'Completed') AND FOLD.RCT_NAME LIKE '%Wells%' AND (SC.SER_ACTUALFINISH >= TO_DATE('01-04-2005 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) AND (SC.SER_ACTUALFINISH < TO_DATE('01-04-2005 12:00:00', 'DD-MM-YYYY HH24:MI:SS')) ORDER BY SC.SER_ACTUALFINISH]]>
</SelectQuery>
<InsertQuery>
<![CDATA[INSERT INTO SC_TEST(CALL_ID, DISPOSITION_CODES, RESTORATION_TIME, BUSINESS_DURATION, TTO1,TTO2, NOTIFICATION_TIME, ESCALATION_TIME, NO_OF_HOPS, RESPONSE_TIME, ACTUAL_DURATION) VALUES(?,?,?,?,?,?,?,?,?,?,?)]]>
</InsertQuery>
<UpdateQuery>
<![CDATA[UPDATE WO_TEST SET CALL_ID = ?, WOR_CREATED=?, WOR_DESCRIPTION = ?, WOR_ACTUALSTART=?, WOR_ACTUALFINISH = ?, WOR_CATEGORY=?, WOR_PRIORITY = ?, WOR_IMPACT=?,WOR_CLOSURE_CODE =?, WOR_VENDOR=?, VENDOR_TYPE=?, ORG_STRUCTURE=?, RESTORATION_TIME=?, RESTORATION_BUS_DURATION=? WHERE WOR_ID=?]]>
</UpdateQuery>
</Category>

The output am getting is:

Category--->WorkOrder
Select Query--->SELECT ITS.WOR_ID, SC.SER_ID, TO_CHAR(ITS.REG_CREATED, 'DD-MM-YYYY HH24:MI:SS'), WOR_DESCRIPTION, TO_CHAR(WOR_ACTUALSTART, 'DD-MM-YYYY HH24:MI:SS'), TO_CHAR(WOR_ACTUALFINISH,'DD-MM-YYYY HH24:MI:SS'), CAT.RCT_NAME, PRI.CDL_NAME, IMP.CDL_NAME, CLO.CDL_NAME, ORG_NAME1, VENDOR_TYPE.CDL_NAME, (SELECT SUBSTR(SYS_CONNECT_BY_PATH(ORG1.ORG_NAME1, '=='), 3, LENGTH (SYS_CONNECT_BY_PATH(ORG1.ORG_NAME1, '=='))) FROM SERVICEDESK.ITSM_ORGANIZATIONS ORG1 WHERE ORG1.ORG_OID = ITS.ASS_CONTR_OUT_ORG START WITH ORG1.ORG_PARENT IS NULL CONNECT BY PRIOR ORG1.ORG_OID = ORG1.ORG_PARENT AND ORG1.ORG_OID = ITS.ASS_CONTR_OUT_ORG) PATH FROM SERVICEDESKREPO.REP_CODES_TEXT STATUS, SERVICEDESKREPO.REP_CODES_TEXT FOLD, SERVICEDESKREPO.REP_CODES_TEXT CAT, SERVICEDESKREPO.ITSM_CODES_LOCALE PRI, SERVICEDESKREPO.ITSM_CODES_LOCALE IMP, SERVICEDESKREPO.ITSM_CODES_LOCALE CLO, SERVICEDESK.ITSM_WORKORDERS ITS, SERVICEDESK.ITSM_SERVICECALLS SC, SERVICEDESK.ITSM_WOR_CUSTOM_FIELDS CF, SERVICEDESKREPO.ITSM_CODES_LOCALE VENDOR_TYPE, SERVICEDESK.ITSM_ORGANIZATIONS ORG WHERE ORG_OID = ASS_CONTR_OUT_ORG AND WOR_OID = CF.WCF_WOR_OID AND CF.WCF_COD5_OID = VENDOR_TYPE.CDL_OID AND WOR_SER_OID = SC.SER_OID AND ITS.WOR_STA_OID = STATUS.RCT_RCD_OID AND ITS.WOR_CAT_OID = CAT.RCT_RCD_OID AND ITS.WOR_PRI_OID = PRI.CDL_COD_OID AND ITS.WOR_POO_OID = FOLD.RCT_RCD_OID AND ITS.WOR_IMP_OID = IMP.CDL_COD_OID AND ITS.WOR_CLO_OID = CLO.CDL_COD_OID AND (STATUS.RCT_NAME = 'Closed' OR STATUS.RCT_NAME = 'Completed') AND FOLD.RCT_NAME LIKE '%Wells%' AND (SC.SER_ACTUALFINISH >= TO_DATE('01-04-2005 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) AND (SC.SER_ACTUALFINISH < TO_DATE('01-04-2005 12:00:00', 'DD-MM-YYYY HH24:MI:SS')) ORDER BY SC.SER_ACTUALFINISH
Update Query--->UPDATE WO_TEST SET CALL_ID = ?, WOR_CREATED=?, WOR_DESCRIPTION = ?, WOR_ACTUALSTART=?, WOR_ACTUALFINISH = ?, WOR_CATEGORY=?, WOR_PRIORITY = ?, WOR_IMPACT=?,WOR_CLOSURE_CODE =?, WOR_VENDOR=?, VENDOR_TYPE=?, ORG_STRUCTURE=?, RESTORATION_TIME=?, RESTORATION_BUS_DURATION=? WHERE WOR_ID=?
Insert -Query--->INSERT INTO SC_TEST(CALL_ID, DISPOSITION_CODES


Error is :
I am getting the Insert query partially.

I checked it, If I give a small Select query then there is no problem. As the Select query is too big I am getting only partial Insert query. The Select query is before Insert query

Thanks in Advance,
Ur Friend,
Ghouse
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you tell us a bit more about how you are parsing - DOM, SAX, XSL ?
What tools you are using to parse? Are you using a Java based or C++ based parser? Is it possible you maybe over-writing some memory?

Just thinking out loud.....

- m
 
My pie came with a little toothpic holding up this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic