SAX Parser parses half the tag randomly

Hello,
I have a SAX parser which parses an XML <edc:EngagementStartDate>2004-06-10</edc:EngagementStartDate>.
Randomly,the parser returns "200" as the parsed character data.
This tag is in row no.231 in the XML.If i move this row to row no.230 or 232 I do not get this error.
Its really weird as there is no pattern and if I remove this row,it stops in another row.
any idea or suggestion would be great.Its not nothing with the numbers.Even if I have <edc:EngagementStartDate>Test</edc:EngagementStartDate>,it parses just the first 3 characters

if (strQName.equals(ENGSTARTDATE))
if(!blnEngStartDateVisited)
tests = tests + ENGSTARTDATE + ":";
blnEngStartDateEnd = true;
blnEngStartDate = false;
This is from the endElemennt().
I have a visted variable which I set in characters method to make sure I visisted the characters().
Please let me know if anything strikes you.I am clueless as there is no pattern why it parses 3 characters in this row.

Similar Messages

  • SAX XML Parsing

    I am very new to JAVA, but been doing JavaScript for many years. I am working in an Eclipse based editor. I have the task of reading an XML file, parsing it, using the tags as table and fields, and the values as parameters. I was successfully able to parse the XML easily with SAX, but I am having a hell of a time controling my values.
    Can someone point me in the right direction on how to distinguish the tag values from the data values returned from XML? I basically need to write select statements based on these XLM files, retrieve the data from SQL, then build the output in an XML structure.
    One more thing; this has to be dynamic. It needs to be able to accept random XML structures because I'll never know what is going to be imported in.
    Thanks for any help.
    -Motley Drew

    Sorry, I've never done much with XML, so i don't know
    the proper terminology. Here is a simple sample of
    what I mean.
    <customer>
    <name>MonkeyBoy Inc</name>
    <state>AZ</state>
    </customer>Okay. In that example, "customer", "name", and "state" are element names. Your example shows a "customer" element. It has for children a "name" element and a "statement" element (plus some whitespace text elements). The "name" element and the "state" element both have a single child, a text node in both cases.
    If you're using a SAX parser then the startElement() method gives you an element name. The characters() method gives you characters from a text node. Beware of this because it will give you the whitespace that you want to ignore, and it can give you a text node in pieces (more than one call).
    The term "tag" does exist in XML but it is restricted to talking about begin tags (the <customer> bit at the start of the element) and end tags (the </customer> bit at the end of the element).

  • How to parse xml file to read the tags

    Hi All,
    I am having a requirement to read the tags from the xml file(xml parsing).
    The main issue is *xml file is stored in the table with xml type column* (not placed directly in the server) and we have to read the tags from that xml file.
    Please help me to achieve it.
    Regards,
    Akshata
    Edited by: Akshata on Mar 21, 2013 3:44 AM

    Hi,
    Akshata wrote:
    The main issue is xml file is stored in the table clob/blob type column (not placed directly in the server) and we have to read the tags from that xml file.How is that an issue? On the contrary, it's better when the data already resides in the database, though it should be in an XMLType column to leverage the full capacity of the Oracle parser.
    What's the datatype of the column exactly? CLOB or BLOB?
    Either way you'll have to convert in to XMLType datatype using the XMLType constructor.
    Did you go through the countless examples on this forum? Examples with XMLTable should be helpful.
    Post some sample data and database version if you need additional guidance.
    Thanks.

  • Error while parsing the Tag Library Descriptor

    Hi,
    We are installing LC ES2 on Suse64 / weblogic platform. When the adobe-conmtentservices application is starting, we see a lot od error like this:
    <Mar 24, 2010 10:56:53 AM CET> <Warning> <HTTP> <BEA-101196> <[/contentspace]: Error while parsing the Tag Library Descriptor at "/opt/oracle/product/WLS1031/user_projects/domains/LC9/servers/LC9_MS/tmp/_WL_user/adobe- contentservices/4xxkue/war/WEB-INF/contentservices.tld".
    com.ctc.wstx.exc.WstxIOException: Tried all: '1' addresses, but could not connect over HTTP to server: 'java.sun.com', port: '80'
            at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
            at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
            at weblogic.servlet.internal.TldCacheHelper$TldIOHelper.parseXML(TldCacheHelper.java:134)
            at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:380)
            at weblogic.servlet.internal.TldCacheHelper.parseTagLibraries(TldCacheHelper.java:65)
            Truncated. see log file for complete stacktrace
    java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: 'java.sun.com', port: '80'
            at weblogic.net.http.HttpClient.openServer(HttpClient.java:314)
            at weblogic.net.http.HttpClient.openServer(HttpClient.java:404)
            at weblogic.net.http.HttpClient.New(HttpClient.java:240)
            at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:172)
            at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:356)
            Truncated. see log file for complete stacktrace
    The application tries to download something from java.sun.com site but the server can not access internet. The process is repeated for each TLD file !
    After a very time (more than 45 minutes!), the server finally starts and all adobe application are active
    So, how to correct this behaviror ? is there a patch?
    cb.

    Hi,
    Did you get solution for this because I am also facing same issue. Please do reply ASAP... it is very uegent.
    Regards,
    Srujan

  • WD4VC Callable Object: No parser configuration entry for the tag Invoke

    I am trying to use a Visual Composer model as a callable object. I can deploy OK (as a Web Dynpro model, having checked the copmiler options "Deploy Model with PAR" and "Add Guided Procedure information").
    When I try to test the Callable Object, I get the following error:
    com.sap.tc.wd4vc.intapi.info.exception.WD4VCRuntimeException: No parser configuration entry for the tag Invoke.
    No idea how to get around this.
    Any help greatly appreciated.
    Kind Regards,
    Tony.

    Hi Mario,
    We have only three runtime in VC 7.0
    1. XGraph
    2. Flash
    3. Webdynpro.
    In your blog on wiki Flex runtime is mentioned  as given below:
    Webdynpro runtime is not fully supported in NW04s and some tags may not be supported as stated in the error. The reccomendation is to use the flex runtime.
    Is Flex runtime and  Flash runtime is same ,
    I have tried to deploy the model in Flash runtime and  Portal runtime error ocurs by diasply renderning JSP Component,
    But when i deploy it in Webdynpro runtime , it works fine for displaying data in Table.But gives error :No parser configuration entry for the tag ChartView , when i used chart in place of table .
    Thanks.

  • Why the SAX parser cannot support the special character like "¡"

    I do not understand why the SAX parser cannot support the special character like &iexcl; but it can replace the &quot; &amp; &lt; &gt;   to ", &, <, >, ,, but other characters will be replaced to empty charater.
    can somebody give me any suggestions or solutions. THX.
    Edited by: 844086 on 2011-3-14 上午2:27
    Edited by: 844086 on 2011-3-14 上午2:27

    I quote:
    Alternatively implement an EntityResolver that resolves the desired escapes.You are again an example that people only read/register the first thing written in a post.

  • [svn:osmf:] 10440: Add parser support for the Video tag.

    Revision: 10440
    Author:   [email protected]
    Date:     2009-09-20 15:03:56 -0700 (Sun, 20 Sep 2009)
    Log Message:
    Add parser support for the Video tag.  Add unit test for an empty document.
    Modified Paths:
        osmf/trunk/libs/VAST/.flexLibProperties
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/model/VASTInlineAd.as
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/parser/VASTParser.as
        osmf/trunk/libs/VASTTest/org/openvideoplayer/vast/parser/TestVASTParser.as
    Added Paths:
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/model/VASTMediaFile.as
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/model/VASTVideo.as

    The video tag only supports a few formats and MKV (Matroska Multimedia Container) isn't one of them.<br />
    Your only option is to use the object (or embed) tag and use a player that can handle that format.<br />
    If might be better to switch to the WebM format.<br />
    * https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements

  • Can the parser accept empty integer tags ?

    I am making use of a EAI tool called SeeBeyond. This makes use of the j2sdk-1_3_1_02 Java Compiler.
    In the application I make use of a XSD to parse XML data. Because the data comes from another source, some tags are not populated with data, witch is correct. The problem is these tags are of type Integer. The java compiler gives back an error stating that an integer value is required.
    Does this indicate that the xml tag MUST be populated with a value or can it accept NULL values?
    XSD snippet:
    ~~~~~~~~~~
    <xs:complexType name="AssetModel">
    <xs:sequence>
         <xs:element name="test1" type="xs:integer"/>
    </xs:sequence>
    </xs:complexType>
    XML Data snippet:
    ~~~~~~~~~~~~~~
    <AssetModel>
         <test1/>
    </AssetModer>

    Thanks for the link
    On the same website they make use of empty integer type tags, which leaves me thinking if it is not allowed.... I validated the data in XML SPY and it validates the empty tags without any problems. One of the other programmers here used the XML in C# and the MS XML Parser could import the data into SQL Server.
    http://www.w3schools.com/schema/schema_complex_empty.asp
    I could not find any referal to this on W3C.org

  • No parser configuration entry for the tag ChartView

    Hi All,
    We have created chartview in VC 7.0 but getting below error while deploying in webdynpro runtime.
    <b>com.sap.tc.wd4vc.intapi.info.exception.WD4VCRuntimeException: No parser configuration entry for the tag ChartView</b>
    Rohit

    Hi Mario,
    We have only three runtime in VC 7.0
    1. XGraph
    2. Flash
    3. Webdynpro.
    In your blog on wiki Flex runtime is mentioned  as given below:
    Webdynpro runtime is not fully supported in NW04s and some tags may not be supported as stated in the error. The reccomendation is to use the flex runtime.
    Is Flex runtime and  Flash runtime is same ,
    I have tried to deploy the model in Flash runtime and  Portal runtime error ocurs by diasply renderning JSP Component,
    But when i deploy it in Webdynpro runtime , it works fine for displaying data in Table.But gives error :No parser configuration entry for the tag ChartView , when i used chart in place of table .
    Thanks.

  • SAX XML Parser problem

    Hi,
    I have a standard .xml file and a file called TemplateContentHandler that parses the info in the xml doc but there is an error in it. See below:
    TemplateContentHandler.java
    if ( strElementName.equals( TemplateConstants.RNC_Module_LDN_TU1 ) ) {
                timingUnit1TagExistInDefaultTemplateFile = true;
                System.err.println("timingUnit1TagExistInDefaultTemplateFile for TU1 == "+timingUnit1TagExistInDefaultTemplateFile);
                System.err.println("strValue for TU1 == "+strValue);
                tTemplate.setRNC_Module_LDN_TU1( strValue );
                Trace.exit();
                return;
            if ( strElementName.equals( TemplateConstants.RNC_Module_LDN_TU2 ) ) {
                timingUnit2TagExistInDefaultTemplateFile = true;
                System.err.println("timingUnit2TagExistInDefaultTemplateFile for TU2 == "+timingUnit2TagExistInDefaultTemplateFile);
                System.err.println("strValue for TU2 == "+strValue);
                tTemplate.setRNC_Module_LDN_TU2( strValue );       
                Trace.exit();
                return;
            }DefaultTemplate
    <RNC_Module_LDN_TU2>ManagedElement=1,Equipment=1,Subrack=MS,Slot=5,PlugInUnit=1</RNC_Module_LDN_TU2>
    <RNC_Module_LDN_TU1>ManagedElement=1,Equipment=1,Subrack=MS,Slot=4,PlugInUnit=1</RNC_Module_LDN_TU1>
    OutPut
    root@atrcus13> timingUnit2TagExistInDefaultTemplateFile for TU2 == true
    strValue for TU2 == ManagedElement=1,Equipment=1,Subrack=MS,Slot=5,PlugInUnit=1
    timingUnit1TagExistInDefaultTemplateFile for TU1 == true
    strValue for TU1 == ManagedElement=1,Equipment=1,Subrack=MS,SlottimingUnit1TagExistInDefaultTemplateFile for TU1 == true
    strValue for TU1 == =4,PlugInUnit=1
    as you can see it parses the Tag <RNC_Module_LDN_TU1> twice and splits it in2 pieces. does anyone know why this is? Also I added a dirty hack whcih works:
    private int timimngUnit1Tagcounter = 0;
        private int timimngUnit2Tagcounter = 0;
    if( timimngUnit1Tagcounter == 0) {
                    tempTU1 = strValue;
                    timimngUnit1Tagcounter++;
                    Trace.message("FIRST TIME STRVALUE === "+strValue);
                    tTemplate.setRNC_Module_LDN_TU1( strValue );
                else {
                    Trace.message("SECOND TIME STRVALUE === " + tempTU1+strValue);
                     tTemplate.setRNC_Module_LDN_TU1( tempTU1+strValue );
                     timimngUnit1Tagcounter = 0;
                }but now the parser is screwing up other tags in the file; anyone have any ideas?
    Thanks,
    Vinnie

    In which method is the code you've posted called?
    Given your results, I'd suspect that it's in characters, and strValue is a string created from the character data passed in.
    in that case, read
    http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int)
    in particular
    The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.
    The accepted pattern of use where you want to process all character data between tags in one go is to use a StringBuffer to acculmulate the characters, then process them in the following endElement or beginElement method.
    Pete

  • How to use sax xml parser

    hi was wondering if someone could give me an example on how to use sax
    and a document handler and explain a bit

    to use sax parsers you need basically to extends handlerBase wich will force you to have the 3 following methods
    // imports for the sax portion of the manager,
    // the portion that will permit the interpretation of
    import com.sun.xml.parser.Resolver;
    import org.xml.sax.*;
    import org.xml.sax.helpers.ParserFactory;
    public class XMLManager extends HandlerBase
    private String currentElement = null; //current element name for parsing
    * Default constructor
    public XMLManager()
    /*SAX METHODS*/
    * This method is called when the SAX parser encounters an open element
    * tag. Must remember which element tag was just opened (so that the
    * characters(..) method can do something useful with the data that is
    * read by the parser.
    public void startElement(String name,AttributeList atts){
    if( name.equalsIgnoreCase("MY XML TAG NAME") )
    currentElement = "MY XML TAG NAME";
    //then do stuff for that type of tag
    * This method is called when the SAX parser encounters a close element
    * tag. If the message tag is closed it means the message is valid and ready
    * to be treated
    public void endElement(String name){
    currentElement = "";
    * This method is called when the SAX parser encounters #PCDATA or CDATA.
    * It is important to remember which element tag was just opened so that
    * this data can be put in the right object or variable.
    * Also the start index and length integer must be used to retrieve only
    * a portion of the data stored in the char[]
    * This section will only contain treatment for tags wich have content
    * between start and end tags
    public void characters(char ch[],int start,int length){
    //dont read ch[] , use the
    //range provided by the SAX parser.
    String value = new String(ch,start ,length);
    Once you have defined these 3 methods, define a method called for example parseIt(String mss) wich will contain the following code to parse the content of a string mss, a string containing xml data
    try
    //create an InputSource from the XML source received
    StringReader r = new StringReader(mss);
    InputSource is = new InputSource( r );
    //create a SAX parser using SAX interfaces and classes
    String parserClassName = "com.sun.xml.parser.Parser";
    org.xml.sax.Parser parser = org.xml.sax.helpers.ParserFactory.makeParser(parserClassName);
    //create document handler to do something useful
    //with the XML document being parsed by the parser.
    parser.setDocumentHandler(this);
    parser.parse(is);
    catch(Throwable t){System.out.println(t);t.printStackTrace();}
    you can't fail with this ;)

  • Xml parsing issue with the existsnode function

    Hi Friends,
    I have a question as like below
    We have the contacts and alternate contacts request as like below.
    <TXLife>
    <UserAuthRequest>
    <UserLoginName>hqtest24</UserLoginName>
    <UserDate>2012-07-11</UserDate>
    <UserTime>12:42:55</UserTime>
    </UserAuthRequest>
    <TXLifeRequest>
    <TransRefGUID>0c95642d-663a-455f-bd92-aca678538986</TransRefGUID>
    <TransType tc="1204">OLI_TRANS_TRNPARTY</TransType>
    <TransExeDate>2012-07-11</TransExeDate>
    <TransExeTime>12:42:55</TransExeTime>
    <InquiryLevel tc="3">OLI_INQUIRY_OBJRELOBJ</InquiryLevel>
    <InquiryView>
    <InquiryViewCode>INTERMEDIARYUPDATE-CHBM-1204A</InquiryViewCode>
    </InquiryView>
    <OLifE>
    <SourceInfo>
    <SourceInfoName>CHBM Admin Tool</SourceInfoName>
    </SourceInfo>
    <Party id="Intermediary1">
    <PartyTypeCode tc="2">OLI_PT_ORG</PartyTypeCode>
    <PartySysKey SystemCode="CHBM">111259</PartySysKey>
    <FullName>Example Law Firm test</FullName>
    <Organization>
    <DBA>Example Law Firm test</DBA>
    </Organization>
    <Address>
    <AddressTypeCode tc="2">OLI_ADTYPE_BUS</AddressTypeCode>
    <Line1>20 Yellow Brick Rd</Line1>
    <Line2>Suite 23</Line2>
    <Line3>line 3</Line3>
    <City>wonderland34</City>
    <AddressState>NY</AddressState>
    <Zip>229292</Zip>
    <AddressCountry>US</AddressCountry>
    </Address>
    <Phone>
    <PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
    <DialNumber></DialNumber>
    </Phone>
    <Phone>
    <PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
    <DialNumber></DialNumber>
    </Phone>
    <Attachment id="Attachment1">
    <DateCreated>2012-07-11</DateCreated>
    <UserCode>hqtest24</UserCode>
    <AttachmentBasicType tc="1">Text</AttachmentBasicType>
    <AttachmentSource>ATTORNEY</AttachmentSource>
    <Description>INTERMEDIARY TYPE UPDATED</Description>
    <AttachmentData>Attorney</AttachmentData>
    <AttachmentType tc="1009800001">Transaction Log</AttachmentType>
    <AttachmentLocation tc="1">Inline</AttachmentLocation>
    <OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
    <AttachmentExtension>
    <CreationTime>12:42:55</CreationTime>
    <Sequence>1</Sequence>
    </AttachmentExtension>
    </OLifEExtension>
    </Attachment>
    <Attachment id="Attachment2">
    <DateCreated>2012-07-11</DateCreated>
    <UserCode>hqtest24</UserCode>
    <AttachmentBasicType tc="1">Text</AttachmentBasicType>
    <AttachmentSource>James</AttachmentSource>
    <Description>ALTERNATE CONTACT FIRST NAME UPDATED</Description>
    <AttachmentType tc="1009800001">Transaction Log</AttachmentType>
    <AttachmentLocation tc="1">Inline</AttachmentLocation>
    <OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
    <AttachmentExtension>
    <CreationTime>12:42:55</CreationTime>
    <Sequence>2</Sequence>
    </AttachmentExtension>
    </OLifEExtension>
    </Attachment>
    <Attachment id="Attachment3">
    <DateCreated>2012-07-11</DateCreated>
    <UserCode>hqtest24</UserCode>
    <AttachmentBasicType tc="1">Text</AttachmentBasicType>
    <AttachmentSource>Mathew</AttachmentSource>
    <Description>ALTERNATE CONTACT LAST NAME UPDATED</Description>
    <AttachmentType tc="1009800001">Transaction Log</AttachmentType>
    <AttachmentLocation tc="1">Inline</AttachmentLocation>
    <OLifEExtension VendorCode="0098" ExtensionCode="Attachment">
    <AttachmentExtension>
    <CreationTime>12:42:55</CreationTime>
    <Sequence>3</Sequence>
    </AttachmentExtension>
    </OLifEExtension>
    </Attachment>
    <EMailAddress>
    <EMailType tc="1">Business</EMailType>
    <AddrLine></AddrLine>
    </EMailAddress>
    <URL>
    <URLAddr>www.example.com</URLAddr>
    <URLType tc="1">Home Page</URLType>
    </URL>
    </Party>
    <Activity id="Activity1" HoldingID="Intermediary1">
    <UserCode>hqtest24</UserCode>
    <LastUpdate>2012-07-11</LastUpdate>
    <ActivityCode>CHBM10004</ActivityCode>
    <OLifEExtension VendorCode="0098" ExtensionCode="Activity">
    <ActivityExtension>
    <SubActivityCode>CHBM20002</SubActivityCode>
    <LastUpdateTime>12:42:55</LastUpdateTime>
    </ActivityExtension>
    </OLifEExtension>
    </Activity>
    <Party id="Contact1">
    <PartyTypeCode tc="1">OLI_PT_PERSON</PartyTypeCode>
    <PartySysKey>555223</PartySysKey>
    <Person>
    <FirstName>Jack</FirstName>
    <LastName>Scarecrow23</LastName>
    </Person>
    <Phone>
    <PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
    <DialNumber>2223993993</DialNumber>
    </Phone>
    <Phone>
    <PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
    <DialNumber>2223392020</DialNumber>
    </Phone>
    <EMailAddress>
    <EMailType tc="1">Business</EMailType>
    <AddrLine>[email protected]</AddrLine>
    </EMailAddress>
    </Party>
    <Relation id="Relation1" OriginatingObjectID="Intermediary1" RelatedObjectID="Contact1">
    <RelationRoleCode tc="150">Authorized Person</RelationRoleCode>
    </Relation>
    <Relation id="Relation1" OriginatingObjectID="Intermediary1">
    <RelationRoleCode tc="104">Intermediary</RelationRoleCode>
    <RelationDescription tc="42">Attorney</RelationDescription>
    </Relation>
    <Party id="Contact2">
    <PartyTypeCode tc="1">OLI_PT_PERSON</PartyTypeCode>
    <PartySysKey>556915</PartySysKey>
    <Person>
    <FirstName/>
    <LastName/>
    </Person>
    <Phone>
    <PhoneTypeCode tc="2">OLI_PHONETYPE_BUS</PhoneTypeCode>
    <DialNumber>2343434</DialNumber>
    </Phone>
    <Phone>
    <PhoneTypeCode tc="19">OLI_PHONETYPE_FAX</PhoneTypeCode>
    <DialNumber>45345345</DialNumber>
    </Phone>
    <EMailAddress>
    <EMailType tc="1">Business</EMailType>
    <AddrLine>[email protected]</AddrLine>
    </EMailAddress>
    </Party>
    <Relation id="Relation4" OriginatingObjectID="Intermediary1" RelatedObjectID="Contact2">
    <OriginatingObjectType tc="6">Party</OriginatingObjectType>
    <RelatedObjectType tc="6">Party</RelatedObjectType>
    <RelationRoleCode tc="150">Authorized Person</RelationRoleCode>
    <InterestPercent>-1.0</InterestPercent>
    <Sequence>2</Sequence>
    </Relation>
    </OLifE>
    </TXLifeRequest>
    </TXLife>
    From the above request we have to parse the alternate contact details.
    In the procedure we are using as like below
    FOR b IN (
    SELECT t.vAltCntcity vAltCntcity,
    t.Partysyskey Partysyskey,
    t.vAltCntZip vAltCntZip,
    t.vAltCntGovtID vAltCntGovtID,
    t.vAltCntTelno vAltCntTelno,
    t.vAltCntemailaddr vAltCntemailaddr,
    t.vAltCntstats vAltCntstats,
    t.vAltCntAdd1 vAltCntAdd1,
    t.vAltCntAdd2 vAltCntAdd2,
    t.vAltCntAdd3 vAltCntAdd3,
    t.AltCntstate AltCntstate,
    t.AltCntcntry AltCntcntry,
    t.vAltCntBRTH_DT vAltCntBRTH_DT,
    t.vAltCntGender vAltCntGender,
    t.vAltCntFaxno vAltCntFaxno,
    t.vAltCnturladdr vAltCnturladdr,
    t.AltCntorgFST_NM AltCntorgFST_NM,
    t.AltCntorgLST_NM AltCntorgLST_NM,
    t.AltCntorgMID_NM AltCntorgMID_NM,
    t.AltCntorgPFX_NM AltCntorgPFX_NM,
    t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
    t.AltCntpartytypecode AltCntpartytypecode,
    t.vAltCntdatarep vAltCntdatarep,
    t1.vAltCntInterestPercent vAltCntInterestPercent,
    t1.ROID ROID
    FROM (
    SELECT xData doc FROM dual ) temp_table,
    XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
    COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
    , ROID varchar2(50) path '@RelatedObjectID'
    , vAltCntInterestpercent varchar2(100) path 'InterestPercent'
    )t1,
    XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
    COLUMNS
    vAltCntcity VARCHAR2(20) path 'City',
    Partysyskey VARCHAR2(100) path 'PartySysKey',
    vAltCntZip VARCHAR2(20) path 'Address/Zip',
    vAltCntGovtID VARCHAR2(20) path 'GovtID',
    vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
    vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
    vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
    vAltCntAdd1 varchar2(1000) path 'Address/Line1',
    vAltCntAdd2 varchar2(1000) path 'Address/Line2',
    vAltCntAdd3 varchar2(1000) path 'Address/Line3',
    AltCntstate varchar2(100) path 'Address/AddressState',
    AltCntcntry varchar2(100) path 'Address/AddressCountry',
    vAltCntBRTH_DT date path 'Person/BirthDate',
    vAltCntGender char(1) path 'Person/Gender/@tc',
    vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
    vAltCnturladdr varchar2(100) path 'URL/URLAddr',
    AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
    AltCntorgLST_NM varchar2(100) path 'Person/LastName',
    AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
    AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
    AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
    AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
    vAltCntdatarep varchar2(100) path '@DataRep'
    ) t
    LOOP
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName')
    INTO vAltCntFirstnamechk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntFirstnamechkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName')
    INTO vAltCntLastNamechk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntLastNamechkflag:='Y';
    END;
    END LOOP;
    Here while parsing the data for contact2(with the request provided) by using the above procedure its going to exception.
    If the value is not there between the firstname then it should not go to the exception.
    If the firstname tag is not there it should go to the exception.
    But in the above procedure for the altcntfirstname and altcntlastname selectstatements its going to the exception part when there is no value for firstname(<FirstName></FirstName>).
    Is there any way to resolve this issue?
    Regards,
    Jyothirmai

    Hi Odie,
    In the request more than one alternate contact used to come(that means contact1 is primary contact,contact2 is alternate contact1,contact3 is alternate contact2 etc).
    We are retrieving the RelatedObjectID and named as ROID in the for loop.
    That means in the for loop we are getting the RelatedObjectID,if that RelatedObjectID is equal to party id then that firstname we are checking by using the below select statement.
    suppose when we used as like below in the loop the same RelatedObjectID(contact2) is repeating every time.
    FOR b IN (
    SELECT t.vAltCntcity vAltCntcity,
    t.Partysyskey Partysyskey,
    t.vAltCntZip vAltCntZip,
    t.vAltCntGovtID vAltCntGovtID,
    t.vAltCntTelno vAltCntTelno,
    t.vAltCntemailaddr vAltCntemailaddr,
    t.vAltCntstats vAltCntstats,
    t.vAltCntAdd1 vAltCntAdd1,
    t.vAltCntAdd2 vAltCntAdd2,
    t.vAltCntAdd3 vAltCntAdd3,
    t.AltCntstate AltCntstate,
    t.AltCntcntry AltCntcntry,
    t.vAltCntBRTH_DT vAltCntBRTH_DT,
    t.vAltCntGender vAltCntGender,
    t.vAltCntFaxno vAltCntFaxno,
    t.vAltCnturladdr vAltCnturladdr,
    t.AltCntorgFST_NM AltCntorgFST_NM,
    t.AltCntorgLST_NM AltCntorgLST_NM,
    t.AltCntorgMID_NM AltCntorgMID_NM,
    t.AltCntorgPFX_NM AltCntorgPFX_NM,
    t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
    t.AltCntpartytypecode AltCntpartytypecode,
    t.vAltCntdatarep vAltCntdatarep,
    t1.vAltCntInterestPercent vAltCntInterestPercent,
    t1.ROID ROID
    FROM (
    SELECT xData doc FROM dual ) temp_table,
    XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
    COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
    , ROID varchar2(50) path '@RelatedObjectID'
    , vAltCntInterestpercent varchar2(100) path 'InterestPercent'
    )t1,
    XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
    COLUMNS
    vAltCntcity VARCHAR2(20) path 'City',
    Partysyskey VARCHAR2(100) path 'PartySysKey',
    vAltCntZip VARCHAR2(20) path 'Address/Zip',
    vAltCntGovtID VARCHAR2(20) path 'GovtID',
    vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
    vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
    vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
    vAltCntAdd1 varchar2(1000) path 'Address/Line1',
    vAltCntAdd2 varchar2(1000) path 'Address/Line2',
    vAltCntAdd3 varchar2(1000) path 'Address/Line3',
    AltCntstate varchar2(100) path 'Address/AddressState',
    AltCntcntry varchar2(100) path 'Address/AddressCountry',
    vAltCntBRTH_DT date path 'Person/BirthDate',
    vAltCntGender char(1) path 'Person/Gender/@tc',
    vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
    vAltCnturladdr varchar2(100) path 'URL/URLAddr',
    AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
    AltCntorgLST_NM varchar2(100) path 'Person/LastName',
    AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
    AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
    AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
    AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
    vAltCntdatarep varchar2(100) path '@DataRep'
    ) t
    LOOP
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/@RelatedObjectID][PartyTypeCode/@tc=1]/Person/FirstName')
    INTO vAltCntFirstnamechk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/@RelatedObjectID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntFirstnamechkflag:='Y';
    END;
    end loop;
    For this above code its not going to the exception.we are using this select statement to check whether that node existed or not.
    If that node exists and value is not there, that time we are updating the table with the null value by using the vAltCntFirstnamechkflag value as like below in our procedure.
    IF b.AltCntorgFST_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||b.AltCntorgFST_NM||''''||',';
    ELSIF vAltCntFirstnamechkflag='N' AND vAltCntFirstnamechk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||NULL||''''||',';
    END IF;
    Please find the below procedure what we are using could you please let me know is there any possibility to resolve this issue(if the tag like <firstname></firstname> that
    time also it should not go to the exception).
    CREATE OR REPLACE PROCEDURE CHBM_QA1.PR_CUSTOMERUPDATE(PIN_XML_DATA IN CLOB,po_vResponse OUT clob )
    IS
    xData XMLTYPE:=NULL;
    vActivityCode VARCHAR2(100):=NULL;
    vSubActivityCode VARCHAR2(100):=NULL;
    ncode NUMBER(2):=NULL;
    nErrcode NUMBER(10):=0;
    vInfodesc VARCHAR2(1000):=NULL;
    vStatusinfo VARCHAR2(1000):=NULL;
    vStatus VARCHAR2(100):=NULL;
    vOrgid VARCHAR2(100):=NULL;
    vcity VARCHAR2(100):=NULL;
    vAltCntcity VARCHAR2(20):=NULL;
    vorgcity VARCHAR2(100):=NULL;
    vAddressState VARCHAR2(100):=NULL;
    vZip VARCHAR2(100):=NULL;
    vAltCntZip VARCHAR2(100):=NULL;
    vorgZip VARCHAR2(100):=NULL;
    vGovtID VARCHAR2(100):=NULL;
    vAltCntGovtID VARCHAR2(100):=NULL;
    vorgGovtID VARCHAR2(100):=NULL;
    vFullname VARCHAR2(200):=NULL;
    norgid NUMBER:=0;
    vTelno VARCHAR2(100):=Null;
    vAltCntTelno VARCHAR2(100):=Null;
    vOrgTelno VARCHAR2(100):=null;
    nOrgcnt NUMBER:=0;
    vemailaddr VARCHAR2(200):=null;
    vAltCntemailaddr VARCHAR2(200):=null;
    vorgemailaddr VARCHAR2(200):=null;
    vFISC_YEAR_END_DT VARCHAR2(100);
    vFiscalYearEndMoDaychkflag CHAR(1):='N';
    vFiscalYearEndMoDaychk VARCHAR2(100):=NULL;
    vGovtIDchkflag CHAR(1):='N';
    vGovtIDchk VARCHAR2(100):=NULL;
    vEMailAddresschkflag CHAR(1):='N';
    vEMailAddresschk VARCHAR2(1000):=NULL;
    vDialNumberchkflag CHAR(1):='N';
    vAltCntDialNumberchkflag CHAR(1):='N';
    vDialNumberchk VARCHAR2(100):=NULL;
    vAltCntDialNumberchk VARCHAR2(100):=NULL;
    vFaxnochkflag CHAR(1):='N';
    vAltCntFaxnochkflag CHAR(1):='N';
    vFaxnochk VARCHAR2(100):=NULL;
    vAltCntFaxnochk VARCHAR2(100):=NULL;
    vEMailAddressPchkflag CHAR(1):=NULL;
    vAltCntEMailAddressPchkflag CHAR(1):=NULL;
    vEMailAddressPchk VARCHAR2(200):=NULL;
    vAltCntEMailAddressPchk VARCHAR2(200):=NULL;
    vLastNamechkflag CHAR(1):='N';
    vAltCntLastNamechkflag CHAR(1):='N';
    vFirstNamechkflag CHAR(1):='N';
    vAltCntFirstNamechkflag CHAR(1):='N';
    vTaxidPchkflag CHAR(1):='N';
    vAltCntTaxidPchkflag CHAR(1):='N';
    vBusinessDescchkflag CHAR(1):='N';
    vBusinessDescchk VARCHAR2(2000):=NUll;
    vTaxidPchk VARCHAR2(200):=NULL;
    vAltCntTaxidPchk VARCHAR2(200):=NULL;
    vLastNamechk VARCHAR2(2000):=NULL;
    vAltCntLastNamechk VARCHAR2(2000):=NULL;
    vFirstNamechk VARCHAR2(2000):=NULL;
    vAltCntFirstnamechk VARCHAR2(2000):=NULL;
    vattdate VARCHAR2(50):=NULL;
    dattdate DATE;
    vAdd3Pchkflag CHAR(1):='N';
    vAltCntAdd3Pchkflag CHAR(1):='N';
    vOrgAdd3chkflag CHAR(1):='N';
    vOrgAdd2chkflag CHAR(1):='N';
    vAdd2Pchkflag CHAR(1):='N';
    vAltCntAdd2Pchkflag CHAR(1):='N';
    vOrgAdd3chk VARCHAR2(2000):=NULL;
    vOrgAdd2chk VARCHAR2(2000):=NULL;
    vAdd2Pchk VARCHAR2(2000):=NULL;
    vAltCntAdd2Pchk VARCHAR2(2000):=NULL;
    vAdd3Pchk VARCHAR2(2000):=NULL;
    vAltCntAdd3Pchk VARCHAR2(2000):=NULL;
    nADDR_ID NUMBER:=0;
    cntry VARCHAR2(100):=NULL;
    AltCntcntry VARCHAR2(100):=NULL;
    orgcntry VARCHAR2(100):=NULL;
    vAdd1 VARCHAR2(1000):=NULL;
    vAdd2 VARCHAR2(1000):=NULL;
    vAdd3 VARCHAR2(1000):=NULL;
    vAltCntAdd1 VARCHAR2(1000):=NULL;
    vAltCntAdd2 VARCHAR2(1000):=NULL;
    vAltCntAdd3 VARCHAR2(1000):=NULL;
    vorgAdd1 VARCHAR2(1000):=NULL;
    vorgAdd2 VARCHAR2(1000):=NULL;
    vorgAdd3 VARCHAR2(1000):=NULL;
    state VARCHAR2(100):=NULL;
    AltCntstate VARCHAR2(100):=NULL;
    nptycnt NUMBER:=0;
    orgstate VARCHAR2(100):=NULL;
    vstats VARCHAR2(100):=NULL;
    vAltCntstats VARCHAR2(100):=NULL;
    norgvalue NUMBER:=0;
    nPtyrolCon NUMBER:=0;
    npsnid NUMBER:=0;
    npsn NUMBER:=0;
    dFISC_YEAR_END_DT date:=NULL;
    Gender char(1):=NULL;
    vAltCntGender char(1):=NULL;
    vBRTH_DT VARCHAR2(100):=NULL;
    vAltCntBRTH_DT VARCHAR2(100):=NULL;
    BusinessDesc VARCHAR2(200):=NULL;
    dBRTH_DT date:=NULL;
    dAltCntBRTH_DT date:=NULL;
    prmycnt VARCHAR2(100):=NULL;
    vpsnstats VARCHAR2(100):=NULL;
    vAltCntpsnstats VARCHAR2(100):=NULL;
    vPartySysKey VARCHAR2(100):=NULL;
    vFaxno VARCHAR2(100):=NULL;
    vAltCntFaxno VARCHAR2(100):=NULL;
    vorgFaxno VARCHAR2(100):=NULL;
    nRlplptyid CHBM_PARTY_RELATIONSHIP.ROLE_PLAYR_PRTY_ID%TYPE:=NULL;
    vurladdr VARCHAR2(100):=NULL;
    vAltCnturladdr VARCHAR2(100):=NULL;
    FST_NM VARCHAR2(100):=NULL;
    orgFST_NM VARCHAR2(100):=NULL;
    AltCntorgFST_NM VARCHAR2(100):=NULL;
    LST_NM VARCHAR2(100):=NULL;
    orgLST_NM VARCHAR2(100):=NULL;
    AltCntorgLST_NM VARCHAR2(100):=NULL;
    MID_NM VARCHAR2(100):=NULL;
    orgMID_NM VARCHAR2(100):=NULL;
    AltCntorgMID_NM VARCHAR2(100):=NULL;
    PFX_NM VARCHAR2(100):=NULL;
    orgPFX_NM VARCHAR2(100):=NULL;
    AltCntorgPFX_NM VARCHAR2(100):=NULL;
    SUFX_NM VARCHAR2(100):=NULL;
    orgSUFX_NM VARCHAR2(100):=NULL;
    AltCntorgSUFX_NM VARCHAR2(100):=NULL;
    naddcnt NUMBER:=0;
    nAltaddcnt NUMBER:=0;
    norgseq NUMBER:=NULL;
    nADDR_IDseq NUMBER:=NULL;
    npsnidseq NUMBER:=NULL;
    nAltCntpsnidseq NUMBER:=NULL;
    vTransrefguid VARCHAR2(1000):=NULL;
    nRecfound NUMBER:=0;
    partytypecode varchar2(100):=null;
    AltCntpartytypecode varchar2(100):=null;
    RelationRoleCode VARCHAR2(100):=NULL;
    cUpdateflag CHAR(1):='N';
    vupdatequery CLOB:=null;
    plancode varchar2(100):=null;
    usercreated VARCHAR2(200):=null;
    openeddate VARCHAR2(100);
    openedtime varchar2(100);
    vopeneddate VARCHAR2(100);
    dopeneddate date;
    naddrcnt NUMBER:=0;
    ncnt1 number:=0;
    ncnt2 number:=0;
    ncnt3 number:=0;
    ncnt4 number:=0;
    ncnt5 number:=0;
    ncnt6 number:=0;
    nDelCnt1 number:=0;
    nDelCnt2 number:=0;
    nDelCnt3 number:=0;
    nAltcnt4 number:=0;
    nAltcnt5 number:=0;
    nAltcnt6 number:=0;
    nRelcnt NUMBER:=0;
    nAltRelcnt NUMBER:=0;
    ncnt7 NUMBER:=0;
    nprscnt NUMBER:=0;
    nAltprscnt NUMBER:=0;
    nPlncnt NUMBER:=0;
    npsncnt NUMBER:=0;
    vaddupdatequery VARCHAR2(4000);
    caddUpdateflag CHAR(1):='N';
    vaddrupdatequery VARCHAR2(4000);
    vAltCntaddrupdatequery VARCHAR2(4000);
    caddrUpdateflag CHAR(1):='N';
    cAltCntaddrUpdateflag CHAR(1):='N';
    vpsnupdatequery VARCHAR2(4000);
    vAltCntpsnupdatequery VARCHAR2(4000);
    cpsnUpdateflag CHAR(1):='N';
    cAltCntpsnUpdateflag CHAR(1):='N';
    vCntInterestPercent VARCHAR2(200);
    vAltCntInterestPercent VARCHAR2(200);
    vCntdatarep varchar2(100);
    vAltCntdatarep varchar2(100);
    vAltcnt XMLTYPE:=NULL;
    eParsererror EXCEPTION;
    PRAGMA EXCEPTION_INIT(eParsererror,-31011);
    eUniqueexception EXCEPTION;
    PRAGMA EXCEPTION_INIT(eUniqueexception,-00001);
    eplanexception EXCEPTION;
    PRAGMA EXCEPTION_INIT(eplanexception,-02291);
    eEventexception EXCEPTION;
    PRAGMA EXCEPTION_INIT(eEventexception,-01400);
    BEGIN
    BEGIN
    xData := XMLTYPE.createxml(PIN_XML_DATA);
    END;
    BEGIN
    SELECT extractvalue(value(t),'/TXLifeRequest/TransRefGUID')
    INTO vTransrefguid
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest'))) t
    WHERE existsnode(value(t),'/TXLifeRequest/TransRefGUID')=1
    AND extractvalue(value(t),'/TXLifeRequest/TransRefGUID') IS NOT NULL;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    ncode:=5;
    nErrcode:=200;
    vStatus:='FAILURE';
    vStatusinfo:='General Data Error';
    Raise_application_error(-20201,'Transrefguid does not exist');
    END;
    BEGIN
    SELECT t.vActivityCode,
    t.vSubActivityCode
    INTO vActivityCode,
    vSubActivityCode
    FROM (
    SELECT xData doc
    FROM dual
    ) temp_table,
    XMLTable ( '/TXLife/TXLifeRequest/OLifE' passing doc
    COLUMNS
    vActivityCode VARCHAR2(20) path 'Activity/ActivityCode',
    vSubActivityCode VARCHAR2(20) path 'Activity/OLifEExtension/ActivityExtension/SubActivityCode'
    ) t;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    ncode:=5;
    nErrcode:=200;
    vStatus:='FAILURE';
    vStatusinfo:='RESULTINFO_DATA ';
    Raise_application_error(-20201,'General Data Error');
    END;
    IF vActivityCode='CHBM10003' AND vSubActivityCode='CHBM20002' THEN
    FOR b IN (
    SELECT t.vAltCntcity vAltCntcity,
    t.Partysyskey Partysyskey,
    t.vAltCntZip vAltCntZip,
    t.vAltCntGovtID vAltCntGovtID,
    t.vAltCntTelno vAltCntTelno,
    t.vAltCntemailaddr vAltCntemailaddr,
    t.vAltCntstats vAltCntstats,
    t.vAltCntAdd1 vAltCntAdd1,
    t.vAltCntAdd2 vAltCntAdd2,
    t.vAltCntAdd3 vAltCntAdd3,
    t.AltCntstate AltCntstate,
    t.AltCntcntry AltCntcntry,
    t.vAltCntBRTH_DT vAltCntBRTH_DT,
    t.vAltCntGender vAltCntGender,
    t.vAltCntFaxno vAltCntFaxno,
    t.vAltCnturladdr vAltCnturladdr,
    t.AltCntorgFST_NM AltCntorgFST_NM,
    t.AltCntorgLST_NM AltCntorgLST_NM,
    t.AltCntorgMID_NM AltCntorgMID_NM,
    t.AltCntorgPFX_NM AltCntorgPFX_NM,
    t.AltCntorgSUFX_NM AltCntorgSUFX_NM,
    t.AltCntpartytypecode AltCntpartytypecode,
    t.vAltCntdatarep vAltCntdatarep,
    t1.vAltCntInterestPercent vAltCntInterestPercent,
    t1.ROID ROID
    FROM (
    SELECT xData doc FROM dual ) temp_table,
    XMLTable ( '/TXLife/TXLifeRequest/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]' passing doc
    COLUMNS OOID varchar2(50) path '@OriginatingObjectID'
    , ROID varchar2(50) path '@RelatedObjectID'
    , vAltCntInterestpercent varchar2(100) path 'InterestPercent'
    )t1,
    XMLTable('/Party[@id=$roid]' passing vAltcnt, t1.roid as "roid"
    COLUMNS
    vAltCntcity VARCHAR2(20) path 'City',
    Partysyskey VARCHAR2(100) path 'PartySysKey',
    vAltCntZip VARCHAR2(20) path 'Address/Zip',
    vAltCntGovtID VARCHAR2(20) path 'GovtID',
    vAltCntTelno VARCHAR2(20) path 'Phone[PhoneTypeCode/@tc=2]/DialNumber',
    vAltCntemailaddr VARCHAR2(200) path 'EMailAddress/AddrLine',
    vAltCntstats varchar2(20) path 'Client/ClientStatus/@tc',
    vAltCntAdd1 varchar2(1000) path 'Address/Line1',
    vAltCntAdd2 varchar2(1000) path 'Address/Line2',
    vAltCntAdd3 varchar2(1000) path 'Address/Line3',
    AltCntstate varchar2(100) path 'Address/AddressState',
    AltCntcntry varchar2(100) path 'Address/AddressCountry',
    vAltCntBRTH_DT date path 'Person/BirthDate',
    vAltCntGender char(1) path 'Person/Gender/@tc',
    vAltCntFaxno varchar2(100) path 'Phone[PhoneTypeCode/@tc=19]/DialNumber',
    vAltCnturladdr varchar2(100) path 'URL/URLAddr',
    AltCntorgFST_NM varchar2(100) path 'Person/FirstName',
    AltCntorgLST_NM varchar2(100) path 'Person/LastName',
    AltCntorgMID_NM varchar2(100) path 'Person/MiddleName',
    AltCntorgPFX_NM varchar2(100) path 'Person/Prefix',
    AltCntorgSUFX_NM varchar2(100) path 'Person/Suffix',
    AltCntpartytypecode varchar2(10) path 'PartyTypeCode/@tc',
    vAltCntdatarep varchar2(100) path '@DataRep'
    ) t
    LOOP
    IF b.vAltCntBRTH_DT IS NOT NULL THEN
    dAltCntBRTH_DT:=to_date(b.vAltCntBRTH_DT,'yyyy-mm-dd');
    END IF;
    IF b.vAltCntdatarep != 'Removed' OR b.vAltCntdatarep IS NULL THEN
    BEGIN
    --------------Starting of CHBM_PERSON Table---------
    IF b.vAltCntstats IS NOT NULL THEN
    BEGIN
    SELECT code_val_cd
    INTO vAltCntpsnstats
    FROM chbm_code_reference
    WHERE tbl_nm='CHBM_PERSON'
    AND col_nm='STAT_CD'
    AND acord_cd =b.vAltCntstats;
    EXCEPTION
    WHEN OTHERS THEN
    ncode :=5;
    nErrcode :=2001;
    vStatus :='FAILURE';
    vStatusinfo :='RESULTINFO_DATA ';
    vInfodesc :='Person status details are not available in code reference';
    Raise_application_error(-20201,'Person status details are not available in code reference');
    END;
    END IF;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=2]/DialNumber')
    INTO vAltCntDialNumberchk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=2]/DialNumber') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntDialNumberchkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=19]/DialNumber')
    INTO vAltCntFaxnochk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Phone[PhoneTypeCode/@tc=19]/DialNumber') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntFaxnochkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName')
    INTO vAltCntFirstnamechk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/FirstName') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntFirstnamechkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName')
    INTO vAltCntLastNamechk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/Person/LastName') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntLastNamechkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/EMailAddress/AddrLine')
    INTO vAltCntEMailAddressPchk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/EMailAddress/AddrLine') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntEMailAddressPchkflag:='Y';
    END;
    BEGIN
    SELECT extractvalue(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/GovtID')
    INTO vAltCntTaxidPchk
    FROM TABLE (XMLSEQUENCE (EXTRACT (xData,'/TXLife/TXLifeRequest/OLifE'))) t
    WHERE existsnode(value(t),'/OLifE/Party[@id=/OLifE/Relation[RelationRoleCode/@tc=150][Sequence=2]/b.ROID][PartyTypeCode/@tc=1]/GovtID') =1;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    vAltCntTaxidPchkflag:='Y';
    END;
    IF b.Partysyskey IS NOT NULL THEN
    nAltCntpsnidseq:=b.Partysyskey;
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||'UPDATE CHBM_PERSON SET';
    IF dAltCntBRTH_DT IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' brth_dt ='''||dAltCntBRTH_DT||''''||',';
    END IF;
    IF b.vAltCntGender IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' GEND_CD ='''||b.vAltCntGender||''''||',';
    END IF;
    IF b.vAltCntGovtID IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TAX_ID ='''||b.vAltCntGovtID||''''||',';
    ELSIF vAltCntTaxidPchkflag='N' AND vAltCntTaxidPchk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TAX_ID ='''||NULL||''''||',';
    END IF;
    IF b.vAltCntTelno IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TEL_NO ='''||b.vAltCntTelno||''''||',';
    ELSIF vAltCntDialNumberchkflag='N' AND vAltCntDialNumberchk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' TEL_NO ='''||NULL||''''||',';
    END IF;
    IF b.vAltCntemailaddr IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' EMAIL_ADR ='''||b.vAltCntemailaddr||''''||',';
    ELSIF vAltCntEMailAddressPchkflag='N' AND vAltCntEMailAddressPchk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' EMAIL_ADR ='''||NULL||''''||',';
    END IF;
    IF b.vAltCntFaxno IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FAX_NO ='''||b.vAltCntFaxno||''''||',';
    ELSIF vAltCntFaxnochkflag='N' AND vAltCntFaxnochk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FAX_NO ='''||NULL||''''||',';
    END IF;
    IF vAltCntpsnstats IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' STAT_CD ='''||vAltCntpsnstats||''''||',';
    END IF;
    IF b.AltCntorgLST_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_NM ='''||b.AltCntorgLST_NM||''''||',';
    ELSIF vAltCntLastNamechkflag='N' AND vAltCntLastNamechk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_NM ='''||NULL||''''||',';
    END IF;
    IF b.AltCntorgFST_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||b.AltCntorgFST_NM||''''||',';
    ELSIF vAltCntFirstnamechkflag='N' AND vAltCntFirstnamechk IS NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' FST_NM ='''||NULL||''''||',';
    END IF;
    IF b.AltCntorgMID_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' MID_NM ='''||b.AltCntorgMID_NM||''''||',';
    END IF;
    IF b.AltCntorgPFX_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' PFX_NM ='''||b.AltCntorgPFX_NM||''''||',';
    END IF;
    IF b.AltCntorgSUFX_NM IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' SUFX_NM ='''||b.AltCntorgSUFX_NM||''''||',';
    END IF;
    IF b.vAltCnturladdr IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' WEB_SITE_ID ='''||b.vAltCnturladdr||''''||',';
    END IF;
    IF dopeneddate IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_UPDT_DT ='''||dopeneddate||''''||',';
    END IF;
    IF usercreated IS NOT NULL THEN
    cAltCntpsnUpdateflag:='Y';
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' LST_UPDT_BY_USER_ID ='''||usercreated||''''||',';
    END IF;
    vAltCntpsnupdatequery := SUBSTR(vAltCntpsnupdatequery,1,instr(vAltCntpsnupdatequery,',',-1,1)-1);
    vAltCntpsnupdatequery:=vAltCntpsnupdatequery||' WHERE psn_id='''||nAltCntpsnidseq||'''';
    IF cAltCntpsnUpdateflag='Y' THEN
    EXECUTE IMMEDIATE vAltCntpsnupdatequery;
    vAltCntpsnupdatequery := NULL;
    nAltcnt4:=Sql%rowcount;
    END IF;
    END IF;
    END LOOP;
    END IF;
    END;
    Regards,
    Jyothirmai

  • XML Validation using XDK SAX/DOM Parser

    Hello,
    I am trying to validate xml against xsd using SAX/DOM parser, both the files are stored as CLOB column in the database. I have the requirement to report all the validation errors and based on some helpful advice/code from the earlier posts in this forum, I have used the following code to validate and report the errors.
    The code works fine but for large files it never goes beyond a certain number of errors i.e. getNumMessages() (XMLParseException) never returns value greater than 100 and thus limits the output of the validation errors. Any pointers to suggest change in code or an alternative will be extremely helpful.
    Datebase Version : Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED <> as package <package name>;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.sql.SQLException;
    import oracle.sql.CLOB;
    import oracle.xml.parser.schema.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    public class XMLSchemaVal
    public static String validate(CLOB xmlDoc, CLOB xsdDoc)
    throws Exception
    //Build Schema Object
    XSDBuilder builder = new XSDBuilder();
    Reader xsdInUnicodeFormat = xsdDoc.getCharacterStream();
    XMLSchema schemadoc = (XMLSchema)builder.build(xsdInUnicodeFormat, null);
    //Build XML Object
    Reader xmlInUnicodeFormat = xmlDoc.getCharacterStream();
    // Genereate the SAX
    SAXParser saxparser_doc = new SAXParser();
    // Set Schema Object for Validation
    saxparser_doc.setXMLSchema(schemadoc);
    saxparser_doc.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    saxparser_doc.setPreserveWhitespace (true);
    String returnValue;
    try {
    saxparser_doc.parse (xmlInUnicodeFormat);
    returnValue = "The input XML parsed without errors.\n";
    catch (XMLParseException se) {
    returnValue = "Parser Exception: ";
    for (int i=0 ; i < se.getNumMessages(); i++)
    returnValue += "<LN: " + se.getLineNumber(i) + ">: " + se.getMessage(i);
    //returnValue = "Parser Exception: " + se.getNumMessages();
    catch (Exception e) {
    returnValue = "NonParserException: " + e.getMessage();
    return returnValue;
    Function to call the above utility from PL/SQL
    CREATE OR REPLACE FUNCTION F_XMLSCHEMAVALIDATION (P_XML IN clob ,P_XSD IN clob) RETURN VARCHAR2 IS
    LANGUAGE JAVA NAME XMLSchemaVal.validate(oracle.sql.CLOB,oracle.sql.CLOB) return java.lang.String';
    Thanks.

    Got the answer !!!
    NetBeans it self support generation of dtd file based on XML file.
    Open XML file and right click on the code block. Select option to generate dtd file.
    This is the drtd file it has generated..
    <?xml version='1.0' encoding='UTF-8'?>
    <!--- Put your DTDDoc comment here. -->
    <!ELEMENT book (person)*>
    <!--- Put your DTDDoc comment here. -->
    <!ELEMENT person (age|last|first)*>
    <!--- Put your DTDDoc comment here. -->
    <!ELEMENT first (#PCDATA)>
    <!--- Put your DTDDoc comment here. -->
    <!ELEMENT last (#PCDATA)>
    <!--- Put your DTDDoc comment here. -->
    <!ELEMENT age (#PCDATA)>

  • Sax XML Parser? URLDecoder.decode bad in applet? Explorer Browser jvm?

    Ok, here it goes folks, I have a serious problem with Explorers jvm, I'm developing using jdk 1.3.1 to write swing applets, in anyevent little functions that I use will not work with Explorers Browser, for example, the Explorer JVM understands the Vector addElement function, but not the Vector add function? Also, It doesn't recognize the HashMap class? Ok, is there anyway to control the JVM used with Explorer? Ok, but here goes my real question?
    I am writing an applet/servlet that interfaces with an oracle database. The data is returned in the form of xml. We are using the Sax XML parser interface. The parser code previously in the servlet(server side) and worked fine, but I've now moved the parsing code to the applet side, however, it seems to not want to work on the applet side. It simply hangs? I think it's a jvm issue, I've been getting many hangs with seemingly standard classes and methods, such as URLDecoder.decode(). Anyone else run into this problem using the Sax XML Parser, I have no idea what classes in the SAX Parser could be giving us a problems, or if that is even my issue. Anyone else using SAX XML parsing in an applet with Explorer 5.5. or 5.0, please let me know, if you've had issues?
    Sorry, to be so long winded, and not explaining the problem very well.

    First, get Sun's Java Plug-in from http://java.sun.com/products/plugin/index-1.4.html
    and read up on how to make your browser use it instead.

  • DOM or SAX in parsing.Please GUIDE

    If I have a huge document that I need to parse,
    which is the recommended parser I shud use?
    SAX or DOM.??
    Isnt DOM impractical to use if the document fills
    gigabytes?
    Can some one please answer?

    SAX reads through the document and sends you events of what is read.
    SAX will never store any of the data which is read.
    You can do whatever you like with these events.
    DOM reads through the document and makes a memroy-model of the XML-file.
    This will store the complete XML-document in memory.
    Afterwards, you can browse this structered (in memory) data within your program.
    There is a tradeof between DOM and SAX.
    SAX has a smaller (constant) memory-usage (certainly with large XML-files),
    and has a faster processing of the data.
    But SAX delivers no real structured data and is only read in one direction.
    SAX should be used when large files are read only once in a linear direction
    and if the processing of the data does not rely to much on the structure of the data.
    DOM has a larger memory-usage (certainly with large XML-files),
    and has a slower processing of the data (due to the initial parsing of the file).
    But DOM delivers real structured data which can be manipulated on the structure in any direction.
    DOM should be used when smaller files are read, when many different processing-steps should
    be performed on the data or when the processing of the data is heavily relying on the structure of the data.
    remark that DOM is using SAX as the underlying mechanism for reading the data.
    DOM will read the data using SAX and will build the in-memory structured model of the data
    according to the SAX-events.
    remark also that other solutions such as JDOM and minimal DOM's exist.
    kind regards,

Maybe you are looking for

  • Photoshop CC2014 drawing lag issues...

    Every since the big updates of 2014 (CC, Yosemite), and the ensuing debacle of hardware/software issues, I finally have things working again.  Except for one little caveat: Everytime I restart Photoshop (every morning for the most part), if I don't g

  • How to set up Email in S60v3/5/^3 and bypass the N...

    There are many threads on this board that all say the same thing and usually are about how Nokia Messaging or email is not working or syncing. In an effort to have a base-line to assist with these, I have made the following tutorial to help users to

  • Vendor account in GL account display

    Dear All, I need vendor account to be displayed in GL account. When i see GL balance i want to bring vendor code in GL account display. regards K S Rangarajan

  • Registering a new technical system in SLD - ABAP based

    Hi friends,   For ,Registering a new technical system in SLD - ABAP based I followed the following steps... At first - went  to the SDL - http://server:port/sld - went  to the "Administaton" tab - went  to the "Data Supplier Bridge" In RFC Gateway Se

  • Business Obeject XI 3.1 SP4 and Internet Explorer 8

    Hi, The Business Objects XI3.1 SP4 what's new notes specify Browser support as below Browser support SAP Business Objects applications that are viewed in a browser support Microsoft Internet Explorer 8 in Compatibility mode only. Browsers running in