Resubmitting the archived XML Documents?

Hi,
I just wanted to confirm whether archived XML documents can be resubmitted?
The XI message has been archived in a storage system and now its required to retrieve it in XI system.
Does XI allow this resubmitting?
Edited by: sriparna1 on Nov 16, 2009 8:11 AM

Hi Sriparna,
    Synchronous messages occupy lot of space in the memory/database and hence they are not persisted by default.
If you want the synchronous messages to be persisted, then follow this blog:
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1629352550DB00149050467001567547End?blog=/pub/wlg/1629
Refer this discussion to understand the concept of persistence with respec to sync msgs.
Synchronous Messages persistence in XI
And regarding your question about "How are the successfull and erroneous synchronous messages handled while archiving",
it is very staright forward.
By default, all the succesful messages are archived by the archiving job.
The error messages are not archived.
If you want the error messages to be archived, you have to Cancel them.
After canceling, the status changes from error to cancelled. Then the archiving job will archive the cancelled messages also.
Regards,
Ravi Kanth Talagana

Similar Messages

  • Transaction MB5B takes not into account the archived material documents

    Transaction MB5B takes not into account the archived material documents . Is it possible?

    Hi
         It is not possible to see the archieved materials. Once archieved it will remove from the registry. Cannot be retrieve back.
    Thanks
    Ganesh

  • Creation of DMR and CMR from the archived billing document in EHP3 system

    Hi all
    I read somewhere that one of the functionality in EHP3 is we can create sales document like debit memo request and credit memo request from the archived billing document. I am working on EHP3 system only but i am not able to create the sales document. the system throws an error that billing document doesnt exist
    If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.

    > If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.
    I suggest you open that question in an SD forum together with the support package you run and if you have an industry solution or any business function sets activated or not.
    Markus

  • Creation of sales document (DMR, CMR) from the archived billing document

    Hi all
    I read somewhere that one of the functionality in EHP3 is we can create sales document like debit memo request and credit memo request from the archived billing document. I am working on EHP3 system only but i am not able to create the sales document. the system throws an error that billing document doesnt exist
    If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.

    hi,
    the help says:
    You can use this business function to further optimize your electronic Sales and Billing Processes.
    Electronic data archiving regulations result in a high volume of data for sales documents and require invoices to be archived at an early stage. You can integrate archived billing documents in your business processes more easily. Since you still have electronic access to archived invoices during the sales process, you can manage archiving without delay and execute further sales processes electronically.
    You can more efficiently use the rebate agreements from SAP ERP for your marketing activities. In particular, customers who use SAP CRM (Trade Promotion Management) with a large volume of data for campaigns, target groups, and product segments can define a custom-made logic for their rebate determination and thus avoid potential database problems.
    Integration
    To implement the logic for rebate processing in SAP ERP, you use the Enhancements for Rebate Processing Business Add-In (BAdI). For more information, see the Implementation Guide (IMG) under  Sales and Distribution  Billing  Rebate Processing  Business Add-Ins (BAdIs)  Enhancements for Rebate Processing .
    Prerequisites
    You have activated the Logistics: S&D Simplification (SD_01) business function.
    Features
    You can integrate archived billing documents in your business processes as follows:
    Create sales documents with reference to archived billing documents, such as credit memo and debit memo requests.
    Display archived billing documents.
    When you do either of these steps, the system first looks for the invoice in the database and then in the archive.
    For the sales employee, the processing steps are identical, regardless of where the sales document is stored. As soon as the sales employee processes an archived billing document, they see the relevant information in the message line as well as in the title of the function.
    For rebate processing, you can store your company's check logic in the interface of the Business Add-In (BAdI) Enhancements for Rebate Processing.
    So check if you have activated the business function.
    I hope this helps.
    Balazs

  • UCCX 8 - Dramatic change in the Create File Document step that is used by the Create XML Document step in order to read an XML file

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    For the last 5 years (and in IPCC3.x/4.x,UCCX/5.x/7.x) I've used the same basic subflow to read a XML document that contains holiday dates where the queue should be closed.  I've re-used this script on 20+ client installs and it's always worked.  The structure of the script allows you to pass the path and filename of the XML document as parameters to the subflow. (The document is in the repository)
    I loaded this script in UCCX 8.0.2 recently and it crashed with a Java.IO error.  It looked like it was trying to read the file system directly and not the repository. (In the Linux appliance model this kind of makes sense but why is the step trying to read the file system directly?)
    So I open a TAC case (SR# 615243125) and TAC tells me that the method of using the Create File Document step is not supported anymore and that I should specify the filename directly in the Create XML Document step
    The problem that I see (aside from having to edit all my scripts that use XML files) is that the Create XML Document step is looking for the input to be a type DOCUMENT and not a type STRING.  This seems to imply that I have to hardcode the document in each script that I deploy for a customer.  When it was a string it was easy to construct the full file path from parameters and pass to the subflow.
    Questions to the group
    #1 Am I missing something here?
    #2  Do you assume that you'll be able to load a script that worked fine in UCCX 7 into UCCX 8 and that it should completely function when you're doing everything according to the step reference documentation.
    #3 Cisco didn’t document this in any way that I can find.
    #4 How can you use the Create XML Document step in a fashion that would let you construct the path of the file and the filename previously in the script so you could pass it to a subflow ?  It would seem this functionality has been killed in UCCX 8
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    (Background)
    Create File Document Step
    The input filename is a STRING, could be an explicit path and filename in the repository or a variable that represents that path and string
    The output of this step is a DOCUMENT to be used in the Create XML Document step
    The string FILE_FullPathHolidayFiles references  en_us\folderName\documentName.xml
    The document was properly uploaded into the repository only, NOT trying to directly read c:\foo\blah…
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    The create XML document input can only be a type DOCUMENT

    #1 Am I missing something here?
    You are mixing two different issues together here.
    The Create File Document step is indeed not needed or supported for creating an XML document. That is why there is a unique step; to trigger XML parsing within the MIVR subsystem.
    Accessing the file system is restricted to a single folder within the VOS model (i.e. 8.0+). This folder is not backed up, replicated, or cleaned up automatically. It was intended to give developers some FS access as a temporary swap location only.
    #2  Do you assume that you'll be able to load a script that
    worked fine in UCCX 7 into UCCX 8 and that it should completely
    function when you're doing everything according to the step reference
    documentation.
    Assume nothing; read the documentation and attend one of the dozens of partner training sessions that CCBU put on advising of the upcoming changes.
    #3 Cisco didn’t document this in any way that I can find.
    You're right, I guess, on the Create File vs. XML Document step. AFAIK Cisco never wrote a notice into the Step Reference Guide explicitly stating that you cannot use the Create File Document although the documentation seemed pretty clear to me without it. File system restrictions are documented in the 8.0 release notes.
    Scripting and Development Series: Volume 2, Editor Step ReferenceUse the Create XML Document step to create a logical document that maps a document to another document variable (where the document has already been pre-parsed as an XML document and is ready to be accessed by the Get XML Document Data step).Use this step before the Get XML Document Data step to obtain data from a document formatted using the Extensible Markup Language (XML).
    #4 How can you use the Create XML Document step in a fashion that would
    let you construct the path of the file and the filename previously in
    the script so you could pass it to a subflow ?  It would seem this functionality has been killed in UCCX 8
    No it hasn't; just concatinate a string to build the Source Document parameter the step needs. Example:  "DOC[" + myFilePath + "]"

  • How to extract the actual XML document from soap message?

    My problem is " how to extract the actual XML document from soap message? "
    i just want to extract the attachment i.e. (pure XML document without any soap header or envolope).
    i could be ver thank full if u could solve my problem.
    [email protected]

    Hi,
    This is some skeleton code for extracting an attachment from a SOAPMessage.
    import javax.activation.DataHandler.;
    import javax.xml.soap.*;
    import javax.xml.message.*;
    Iterator allAttachments = message.getAttachments();
    AttachmentPart ap1 = null;
    while(allAttachments.hasNext()){
    ap1 = (AttachmentPart)allAttachments.next();
    //Check that the attachment is correct one. By looking at its mime headers
    //Convert the attachment part into its DOM representation:
    if(ap1.getContentType() == "text/xml"){
    //Use the activation dataHandler class to extract the content, then create a StreamSource from
    //the content.
    DataHandler attachmentContent = ap1.getDataHandler();
    StreamSource attachmentStream = new StreamSource(attachmentContent.getInputStream());
    DOMResult domAttachment = getDOMResult(attachmentStream);
    domAttachment holds an xml representation of the attachment.
    Hope this helps.

  • Include messageID in the custom XML document

    Hello B2B Gurus
    Requirement is to include the B2B messageID in XML Payload? For CUstom documents how can this be acheived? is it possible to extract the message ID from the B2B_WIRE_MESSAGE table before the message is sent across the wire to the destination end point.
    Our Requirement is to package the cutom documnet as a SOAP message and also include MessageID in the SOAP headers. SOAP packaging can be acheived through middleware but I am not sure how to extract the messageID? I thought about callout .... but seems like callout interface doesn't provide any additioanl api's to extract the messageID. Please help.

    Hi Anuj
    Thanks for your response.
    Yes it is for O/B Custom Documents. I have used the BPEL Advanced function "generate-guid()" for the messageID generation and I could see the B2B_WIRE_MESSAGE.messageID being populated with the generted messageiD.
    No issues here. Is there an issue with ithis approach?
    Also, I have noticed that the messageID generated internally by B2B is very different from userGenerated messageID.
    For example: B2B Generated Message ID looks like 8A7F95E8131049BE5D9000001693F06F
    where as user genrated looks like 2d363037353031393135323537363133
    do I need to use any special functions to keep the messageID consistent with B2B generated messageID?
    Thanks

  • How to get the WHOLE xml document inside a string using XSLT mapping

    Hi folks,
    I have a deep xml structure that I want to embed as body, tags included, in a mail message (not as an attachment).
    I'm trying to use Michal's method in this blog
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    However, I can't get it to deliver the entire structure instead of just specific elements.
    Any help is greatly appreciated,
    Thanks,
    Guy

    Ashok,
    I was able to work it out for my case.
    This XSL......
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <inside>
    <namestring>
    <xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
    <xsl:copy-of select="outside/name/*"/>
    <xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
    </namestring>
    </inside>
    </xsl:template>
    </xsl:stylesheet>
    ...will transform this input....
    <?xml version="1.0" encoding="UTF-8"?>
    <outside>
    <name>
    <nameone>name1</nameone>
    <nametwo>name2</nametwo>
    <namethree>name3</namethree>
    </name>
    </outside>
    ...and put the whole lot into the CDATA element.
    Hope this helps you,
    Guy

  • Generating target XML tag from a value in the Source XML document

    Hi there,
    I have a scenario where the following transformation needs to occur:
    Source Message...
    <Catalogue>
      <key>abc<\key>
      <value>123<\value>
      <key>def<\key>
      <value>456<\value>
    <\Catalogue>
    Target Message...
    <Catalogue>
      <abc>123<\abc>  --> Value of KEY becomes the XML tag and the VALUE gets assigned to it
      <def>456<\abc>
    <\Catalogue>
    The target message is written to an xml file using the receiver file adapter.
    I would like the target message generation to be dynamic so that when a new key-value pair is added, it would not require a change in the XI mapping layer.  Is there a way to accomplish this without having to code or enhance the adapter.  I am trying to avoid doing this in the mapping because that would mean changing the mapping every time a new key-value pair needs to be added.
    Any suggestions to accomplish this are welcome.
    Thanks all.

    Hi,
    I doubt if it will work for you. you can generate dynamic values using this but not tags dynamically. You need to see if there are any methods to generate tags dynamically.
    One way of doing this is by using Java Mapping and playing around with InputStream and OutputStream.It will work for sure with this.
    Thanks
    Amit

  • Encoding the & in XML document for URL

    I'm creating an RSS feed. My feed link appears as below. http://www.valpak.com/vpcol/searchCat.do?searchType=geography&searchParameter=" + encodedSearchValue + "&targetedLinkId=" + csVO.getCouponSlugId();
    The marshaller inserts an & for the ampersands. Is that correct? If not, how do I encode the ampersands?
    deb

    Hi,
    In standard system I'm not aware of any setting that would restrict the assignemnt of one delivery to several shipment.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/5f/e411bb044411d2bf5d0000e8a7386f/frameset.htm
    Since a delivery for which the billing document is to be created can be part of several shipments (for example, in the case of a transportation chain), it can happen that several shipment cost documents need to be calculated so that the billing document itself can at all be created.
    I guess you have to:
    - use proper selection criteria when assigning deliveries to the shipment (e.g. proper transportation planning status (VBUK-TRSTA) --> you can define variants)
    - go to development (SPRO > LE > Transportation > System Modifications > User Exits for Transportation + SPRO > LE > Transportation > System Modifications > Biusiness Add-In in Transportation)
    In Is-Oil there are built in checks:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/70/23d610419311d2ac100000e829fbfe/frameset.htm
    Regards,
    Csaba
    Edited by: Csaba Szommer on Jan 19, 2010 8:53 PM

  • HT1451 the itunes xml document just shows up on the internet not in itunes i feel like I'm missing a step that you are not giving to me after the opening of document

    very frustrating

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Please help to read the XML document with XMLTable

    Hi Gurus,
    I am not very familiar with XML parsing. It seems to me it should be very easy to get the data. For some reason, I am having a problem to get the data.
    SELECT *
    FROM util.hlsr_online_entries e,
    XMLTABLE(
      xmlnamespaces(
       'http://tempuri.org/'    as "dt",
       'urn:schemas-microsoft-com:xml-diffgram-v1' as "dg"),
      '/DataTable/dg:diffgram/DocumentElement/JrShowCustomerHeifers'
      PASSING XMLTYPE(e.entry_data)
      COLUMNS
      SeqNo  FOR ORDINALITY,
      DocumentID NUMBER  PATH 'DocumentID',
      ClubName VARCHAR2(100) PATH 'ClubName') as test
    WHERE e.ref_id = 33422
    The above query does not bring any data for me. My hunts is the problem with DocumentElement tab. I have been trying a different variation to handle.
    Please help me out to tune the query
    I have the following XML document from the DotNet developer
    <?xml version="1.0" encoding="utf-8"?>
    <DataTable xmlns="http://tempuri.org/">
      <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="JrShowCustomerHeifers" msdata:UseCurrentLocale="true">
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="JrShowCustomerHeifers">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="DocumentID" type="xs:int" minOccurs="0" />
                    <xs:element name="ClubName" type="xs:string" minOccurs="0" />
                    <xs:element name="LastName" type="xs:string" minOccurs="0" />
                    <xs:element name="FirstName" type="xs:string" minOccurs="0" />
                    <xs:element name="PreferredName" type="xs:string" minOccurs="0" />
                    <xs:element name="Email" type="xs:string" minOccurs="0" />
                    <xs:element name="Exhibitor" type="xs:string" minOccurs="0" />
                    <xs:element name="AnimalName" type="xs:string" minOccurs="0" />
                    <xs:element name="RegistryNo" type="xs:string" minOccurs="0" />
                    <xs:element name="DateofBirth" type="xs:string" minOccurs="0" />
                    <xs:element name="NameofSire" type="xs:string" minOccurs="0" />
                    <xs:element name="SireRegistryNo" type="xs:string" minOccurs="0" />
                    <xs:element name="NameofDam" type="xs:string" minOccurs="0" />
                    <xs:element name="DamRegistryNo" type="xs:string" minOccurs="0" />
                    <xs:element name="Tattoo" type="xs:string" minOccurs="0" />
                    <xs:element name="SecondaryTattoo" type="xs:string" minOccurs="0" />
                    <xs:element name="UniversalIDNumber" type="xs:string" minOccurs="0" />
                    <xs:element name="Tattoo_Location" type="xs:string" minOccurs="0" />
                    <xs:element name="Secondary_Tattoo_Location" type="xs:string" minOccurs="0" />
                    <xs:element name="OracleBreedID" type="xs:int" minOccurs="0" />
                    <xs:element name="JrValidationBreedName" type="xs:string" minOccurs="0" />
                    <xs:element name="ValidationDate" type="xs:dateTime" minOccurs="0" />
                    <xs:element name="ValidatedBy" type="xs:string" minOccurs="0" />
                    <xs:element name="ValidationComment" type="xs:string" minOccurs="0" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:schema>
      <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
        <DocumentElement xmlns="">
          <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers1" msdata:rowOrder="0">
            <DocumentID>18442</DocumentID>
            <ClubName>Perrin FFA</ClubName>
            <LastName>Hamman</LastName>
            <FirstName>Kaily</FirstName>
            <Email>[email protected]</Email>
            <Exhibitor>Hamman, Kaily</Exhibitor>
            <AnimalName>113</AnimalName>
            <RegistryNo>C1026447</RegistryNo>
            <DateofBirth>01/14/2013</DateofBirth>
            <NameofSire>808 GAME DAY 808 LH</NameofSire>
            <SireRegistryNo>C961101</SireRegistryNo>
            <NameofDam>SADDIE 7/7 LE</NameofDam>
            <DamRegistryNo>C941067</DamRegistryNo>
            <Tattoo>113</Tattoo>
            <SecondaryTattoo />
            <UniversalIDNumber>1194F020</UniversalIDNumber>
            <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
            <Secondary_Tattoo_Location />
            <OracleBreedID>6383</OracleBreedID>
            <JrValidationBreedName>Beefmaster</JrValidationBreedName>
            <ValidationDate>2014-11-25T08:39:00-06:00</ValidationDate>
            <ValidatedBy>laineyb</ValidatedBy>
            <ValidationComment />
          </JrShowCustomerHeifers>
          <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers2" msdata:rowOrder="1">
            <DocumentID>18473</DocumentID>
            <ClubName>Perrin FFA</ClubName>
            <LastName>Hamman</LastName>
            <FirstName>Kaily</FirstName>
            <Email>[email protected]</Email>
            <Exhibitor>Hamman, Kaily</Exhibitor>
            <AnimalName>KPH PURPLE CORALEE 349</AnimalName>
            <RegistryNo>P43461953</RegistryNo>
            <DateofBirth>11/04/2013</DateofBirth>
            <NameofSire>PURPLE MOXY 22X ET</NameofSire>
            <SireRegistryNo>P43126458</SireRegistryNo>
            <NameofDam>TCC CORKY 6603</NameofDam>
            <DamRegistryNo>P42457119</DamRegistryNo>
            <Tattoo>349</Tattoo>
            <SecondaryTattoo>KPH</SecondaryTattoo>
            <UniversalIDNumber>1194F021</UniversalIDNumber>
            <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
            <Secondary_Tattoo_Location>TATTOO - Right Ear</Secondary_Tattoo_Location>
            <OracleBreedID>6389</OracleBreedID>
            <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
            <ValidationDate>2014-12-01T11:55:00-06:00</ValidationDate>
            <ValidatedBy>Hannah</ValidatedBy>
            <ValidationComment />
          </JrShowCustomerHeifers>
          <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers3" msdata:rowOrder="2">
            <DocumentID>18474</DocumentID>
            <ClubName>Perrin FFA</ClubName>
            <LastName>Hamman</LastName>
            <FirstName>Kaily</FirstName>
            <Email>[email protected]</Email>
            <Exhibitor>Hamman, Kaily</Exhibitor>
            <AnimalName>LANGFORDS SWEET N SOUR 4107</AnimalName>
            <RegistryNo>43504761</RegistryNo>
            <DateofBirth>03/02/2014</DateofBirth>
            <NameofSire>LH TNT 1017</NameofSire>
            <SireRegistryNo>43199794</SireRegistryNo>
            <NameofDam>LANGFORDS LADY 2206 ET</NameofDam>
            <DamRegistryNo>43315143</DamRegistryNo>
            <Tattoo>4107</Tattoo>
            <SecondaryTattoo />
            <UniversalIDNumber>1194F018</UniversalIDNumber>
            <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
            <Secondary_Tattoo_Location />
            <OracleBreedID>6398</OracleBreedID>
            <JrValidationBreedName>Hereford</JrValidationBreedName>
            <ValidationDate>2014-11-24T14:26:00-06:00</ValidationDate>
            <ValidatedBy>Validator</ValidatedBy>
            <ValidationComment />
          </JrShowCustomerHeifers>
          <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers4" msdata:rowOrder="3">
            <DocumentID>18475</DocumentID>
            <ClubName>Perrin FFA</ClubName>
            <LastName>Hamman</LastName>
            <FirstName>Kaily</FirstName>
            <Email>[email protected]</Email>
            <Exhibitor>Hamman, Kaily</Exhibitor>
            <AnimalName>PURPLE CCC LYDIA 19A</AnimalName>
            <RegistryNo>P43406978</RegistryNo>
            <DateofBirth>02/05/2013</DateofBirth>
            <NameofSire>PURPLE MB WOMANIZER 14UET</NameofSire>
            <SireRegistryNo>P42945146</SireRegistryNo>
            <NameofDam>PURPLE CMCC NASTIA 9U</NameofDam>
            <DamRegistryNo>P42927201</DamRegistryNo>
            <Tattoo>19A</Tattoo>
            <SecondaryTattoo />
            <UniversalIDNumber>1194F017</UniversalIDNumber>
            <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
            <Secondary_Tattoo_Location />
            <OracleBreedID>6389</OracleBreedID>
            <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
            <ValidationDate>2014-12-01T11:55:00-06:00</ValidationDate>
            <ValidatedBy>Hannah</ValidatedBy>
            <ValidationComment />
          </JrShowCustomerHeifers>
          <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers5" msdata:rowOrder="4">
            <DocumentID>18477</DocumentID>
            <ClubName>Perrin FFA</ClubName>
            <LastName>Hamman</LastName>
            <FirstName>Kaily</FirstName>
            <Email>[email protected]</Email>
            <Exhibitor>Hamman, Kaily</Exhibitor>
            <AnimalName>PURPLE SGW EDEN 12B</AnimalName>
            <RegistryNo>P43521932</RegistryNo>
            <DateofBirth>04/02/2014</DateofBirth>
            <NameofSire>RST TIME'S A WASTIN' 0124</NameofSire>
            <SireRegistryNo>43123163</SireRegistryNo>
            <NameofDam>PURPLE SM WONDER WOMAN 160Y</NameofDam>
            <DamRegistryNo>P43235169</DamRegistryNo>
            <Tattoo>12B</Tattoo>
            <SecondaryTattoo>12B</SecondaryTattoo>
            <UniversalIDNumber>1194F015</UniversalIDNumber>
            <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
            <Secondary_Tattoo_Location>TATTOO - Right Ear</Secondary_Tattoo_Location>
            <OracleBreedID>6389</OracleBreedID>
            <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
            <ValidationDate>2014-12-01T11:56:00-06:00</ValidationDate>
            <ValidatedBy>Hannah</ValidatedBy>
            <ValidationComment />
          </JrShowCustomerHeifers>
        </DocumentElement>
      </diffgr:diffgram>
    </DataTable>

    Hi odie_63,
    Good evening. I am not sure what you are suggesting. Please provide me the example how to solve the problem. I am very new to XML parsing.
    In the meantime, I am having another problem to get the data because .net developer changes the webservice format. To me it is supposed to work fine. May be my eyes are getting blurred so, I can't see where I am wrong.
    Thanks in advance. Please help me out.
    SELECT exh.docid,exh.clubname,exh.lname,exh.fname,exh.exhibitor,exh.animalname
    FROM util.hlsr_online_entries e,
    XMLTABLE(
      xmlnamespaces(
       'http://webservices.hlsr.net/JrShowOracleService/' as "dt",
       'urn:schemas-microsoft-com:xml-diffgram-v1'  as "dg"),
      '/dt:GetJrShowCustomerHeifersResponse/GetJrShowCustomerHeifersResult/dg:diffgram/DocumentElement/JrShowCustomerHeifers'
      PASSING XMLTYPE(e.entry_data)
      COLUMNS
      SeqNo  FOR ORDINALITY,
      DocID  NUMBER  PATH 'DocumentID',
      ClubName VARCHAR2(100) PATH 'ClubName',
      LName  VARCHAR2(100) PATH 'LastName',
      FName  VARCHAR2(100) PATH 'FirstName',
      Email  VARCHAR2(100) PATH 'Email',
      Exhibitor VARCHAR2(100) PATH 'Exhibitor',
      AnimalName VARCHAR2(100) PATH 'AnimalName', 
      RegNo  VARCHAR2(100) PATH 'RegistryNo',
      DOB  VARCHAR2(100) PATH 'DateofBirth',
      SireName VARCHAR2(100) PATH 'NameofSire',
      SireRegNo VARCHAR2(100) PATH 'SireRegistryNo',
      Dam  VARCHAR2(100) PATH 'NameofDam',
      DamRegNo VARCHAR2(100) PATH 'DamRegistryNo',
      Tattoo  VARCHAR2(100) PATH 'Tattoo',
      SecTattoo VARCHAR2(100) PATH 'SecondaryTattoo',
      UnivIDNum VARCHAR2(100) PATH 'UniversalIDNumber',
      TattooLoc VARCHAR2(100) PATH 'Tattoo_Location',
      OraBreedID NUMBER  PATH 'OracleBreedID',
      Breed  VARCHAR2(100) PATH 'JrValidationBreedName',
      ValDate  VARCHAR2(100) PATH 'ValidationDate'
      ) as exh
    WHERE e.ref_id = 33432
    <GetJrShowCustomerHeifersResponse xmlns="http://webservices.hlsr.net/JrShowOracleService/">
      <GetJrShowCustomerHeifersResult>
        <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
          <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="JrShowCustomerHeifers" msdata:UseCurrentLocale="true">
            <xs:complexType>
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="JrShowCustomerHeifers">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="DocumentID" type="xs:int" minOccurs="0"/>
                      <xs:element name="ClubName" type="xs:string" minOccurs="0"/>
                      <xs:element name="LastName" type="xs:string" minOccurs="0"/>
                      <xs:element name="FirstName" type="xs:string" minOccurs="0"/>
                      <xs:element name="PreferredName" type="xs:string" minOccurs="0"/>
                      <xs:element name="Email" type="xs:string" minOccurs="0"/>
                      <xs:element name="Exhibitor" type="xs:string" minOccurs="0"/>
                      <xs:element name="AnimalName" type="xs:string" minOccurs="0"/>
                      <xs:element name="RegistryNo" type="xs:string" minOccurs="0"/>
                      <xs:element name="DateofBirth" type="xs:string" minOccurs="0"/>
                      <xs:element name="NameofSire" type="xs:string" minOccurs="0"/>
                      <xs:element name="SireRegistryNo" type="xs:string" minOccurs="0"/>
                      <xs:element name="NameofDam" type="xs:string" minOccurs="0"/>
                      <xs:element name="DamRegistryNo" type="xs:string" minOccurs="0"/>
                      <xs:element name="Tattoo" type="xs:string" minOccurs="0"/>
                      <xs:element name="SecondaryTattoo" type="xs:string" minOccurs="0"/>
                      <xs:element name="UniversalIDNumber" type="xs:string" minOccurs="0"/>
                      <xs:element name="Tattoo_Location" type="xs:string" minOccurs="0"/>
                      <xs:element name="Secondary_Tattoo_Location" type="xs:string" minOccurs="0"/>
                      <xs:element name="OracleBreedID" type="xs:int" minOccurs="0"/>
                      <xs:element name="JrValidationBreedName" type="xs:string" minOccurs="0"/>
                      <xs:element name="ValidationDate" type="xs:string" minOccurs="0"/>
                      <xs:element name="ValidatedBy" type="xs:string" minOccurs="0"/>
                      <xs:element name="ValidationComment" type="xs:string" minOccurs="0"/>
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:choice>
            </xs:complexType>
          </xs:element>
        </xs:schema>
        <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
          <DocumentElement xmlns="">
            <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers1" msdata:rowOrder="0">
              <DocumentID>18442</DocumentID>
              <ClubName>Perrin FFA</ClubName>
              <LastName>Hamman</LastName>
              <FirstName>Kaily</FirstName>
              <Email>[email protected]</Email>
              <Exhibitor>Hamman, Kaily</Exhibitor>
              <AnimalName>113</AnimalName>
              <RegistryNo>C1026447</RegistryNo>
              <DateofBirth>01/14/2013</DateofBirth>
              <NameofSire>808 GAME DAY 808 LH</NameofSire>
              <SireRegistryNo>C961101</SireRegistryNo>
              <NameofDam>SADDIE 7/7 LE</NameofDam>
              <DamRegistryNo>C941067</DamRegistryNo>
              <Tattoo>113</Tattoo>
              <SecondaryTattoo/>
              <UniversalIDNumber>1194F020</UniversalIDNumber>
              <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
              <Secondary_Tattoo_Location/>
              <OracleBreedID>6383</OracleBreedID>
              <JrValidationBreedName>Beefmaster</JrValidationBreedName>
              <ValidationDate>11/25/2014</ValidationDate>
              <ValidatedBy>laineyb</ValidatedBy>
              <ValidationComment/>
            </JrShowCustomerHeifers>
            <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers2" msdata:rowOrder="1">
              <DocumentID>18473</DocumentID>
              <ClubName>Perrin FFA</ClubName>
              <LastName>Hamman</LastName>
              <FirstName>Kaily</FirstName>
              <Email>[email protected]</Email>
              <Exhibitor>Hamman, Kaily</Exhibitor>
              <AnimalName>KPH PURPLE CORALEE 349</AnimalName>
              <RegistryNo>P43461953</RegistryNo>
              <DateofBirth>11/04/2013</DateofBirth>
              <NameofSire>PURPLE MOXY 22X ET</NameofSire>
              <SireRegistryNo>P43126458</SireRegistryNo>
              <NameofDam>TCC CORKY 6603</NameofDam>
              <DamRegistryNo>P42457119</DamRegistryNo>
              <Tattoo>349</Tattoo>
              <SecondaryTattoo>KPH</SecondaryTattoo>
              <UniversalIDNumber>1194F021</UniversalIDNumber>
              <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
              <Secondary_Tattoo_Location>TATTOO - Right Ear</Secondary_Tattoo_Location>
              <OracleBreedID>6389</OracleBreedID>
              <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
              <ValidationDate>12/01/2014</ValidationDate>
              <ValidatedBy>Hannah</ValidatedBy>
              <ValidationComment/>
            </JrShowCustomerHeifers>
            <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers3" msdata:rowOrder="2">
              <DocumentID>18474</DocumentID>
              <ClubName>Perrin FFA</ClubName>
              <LastName>Hamman</LastName>
              <FirstName>Kaily</FirstName>
              <Email>[email protected]</Email>
              <Exhibitor>Hamman, Kaily</Exhibitor>
              <AnimalName>LANGFORDS SWEET N SOUR 4107</AnimalName>
              <RegistryNo>43504761</RegistryNo>
              <DateofBirth>03/02/2014</DateofBirth>
              <NameofSire>LH TNT 1017</NameofSire>
              <SireRegistryNo>43199794</SireRegistryNo>
              <NameofDam>LANGFORDS LADY 2206 ET</NameofDam>
              <DamRegistryNo>43315143</DamRegistryNo>
              <Tattoo>4107</Tattoo>
              <SecondaryTattoo/>
              <UniversalIDNumber>1194F018</UniversalIDNumber>
              <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
              <Secondary_Tattoo_Location/>
              <OracleBreedID>6398</OracleBreedID>
              <JrValidationBreedName>Hereford</JrValidationBreedName>
              <ValidationDate>11/24/2014</ValidationDate>
              <ValidatedBy>Validator</ValidatedBy>
              <ValidationComment/>
            </JrShowCustomerHeifers>
            <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers4" msdata:rowOrder="3">
              <DocumentID>18475</DocumentID>
              <ClubName>Perrin FFA</ClubName>
              <LastName>Hamman</LastName>
              <FirstName>Kaily</FirstName>
              <Email>[email protected]</Email>
              <Exhibitor>Hamman, Kaily</Exhibitor>
              <AnimalName>PURPLE CCC LYDIA 19A</AnimalName>
              <RegistryNo>P43406978</RegistryNo>
              <DateofBirth>02/05/2013</DateofBirth>
              <NameofSire>PURPLE MB WOMANIZER 14UET</NameofSire>
              <SireRegistryNo>P42945146</SireRegistryNo>
              <NameofDam>PURPLE CMCC NASTIA 9U</NameofDam>
              <DamRegistryNo>P42927201</DamRegistryNo>
              <Tattoo>19A</Tattoo>
              <SecondaryTattoo/>
              <UniversalIDNumber>1194F017</UniversalIDNumber>
              <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
              <Secondary_Tattoo_Location/>
              <OracleBreedID>6389</OracleBreedID>
              <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
              <ValidationDate>12/01/2014</ValidationDate>
              <ValidatedBy>Hannah</ValidatedBy>
              <ValidationComment/>
            </JrShowCustomerHeifers>
            <JrShowCustomerHeifers diffgr:id="JrShowCustomerHeifers5" msdata:rowOrder="4">
              <DocumentID>18477</DocumentID>
              <ClubName>Perrin FFA</ClubName>
              <LastName>Hamman</LastName>
              <FirstName>Kaily</FirstName>
              <Email>[email protected]</Email>
              <Exhibitor>Hamman, Kaily</Exhibitor>
              <AnimalName>PURPLE SGW EDEN 12B</AnimalName>
              <RegistryNo>P43521932</RegistryNo>
              <DateofBirth>04/02/2014</DateofBirth>
              <NameofSire>RST TIME&apos;S A WASTIN&apos; 0124</NameofSire>
              <SireRegistryNo>43123163</SireRegistryNo>
              <NameofDam>PURPLE SM WONDER WOMAN 160Y</NameofDam>
              <DamRegistryNo>P43235169</DamRegistryNo>
              <Tattoo>12B</Tattoo>
              <SecondaryTattoo>12B</SecondaryTattoo>
              <UniversalIDNumber>1194F015</UniversalIDNumber>
              <Tattoo_Location>TATTOO - Left Ear</Tattoo_Location>
              <Secondary_Tattoo_Location>TATTOO - Right Ear</Secondary_Tattoo_Location>
              <OracleBreedID>6389</OracleBreedID>
              <JrValidationBreedName>Polled Hereford</JrValidationBreedName>
              <ValidationDate>12/01/2014</ValidationDate>
              <ValidatedBy>Hannah</ValidatedBy>
              <ValidationComment/>
            </JrShowCustomerHeifers>
          </DocumentElement>
        </diffgr:diffgram>
      </GetJrShowCustomerHeifersResult>
    </GetJrShowCustomerHeifersResponse>
    Thanks again.

  • XML document structures must start and end within the same entity

    Hi there,
    I'm working with a client/server application and using SaxParser for reading in xml. I get the SaxParserException: XML document structures must start and end within the same entity. I understand what that means, but it isn't applicable! The xml data being used is well-formed. I checked the well-formedness with Stylus Studio to make sure. Here's the data:
    <?xml version='1.0' encoding='UTF-8'?>
    <vcmessage>
         <vcsource>3</vcsource>
         <processevent>16</processevent>
         <shape>
              <llindex>0</llindex>
              <shapetype>9</shapetype>
              <shapeproperties>
                   <shapelocation>
                        <xcoord>54</xcoord>
                        <ycoord>184</ycoord>
                   </shapelocation>
                   <bounds>
                        <width>24</width>
                        <height>24</height>
                   </bounds>
                   <fgcolor>
                        <fgred>0</fgred>
                        <fggreen>0</fggreen>
                        <fgblue>0</fgblue>
                   </fgcolor>
                   <bgcolor>
                        <bgred>255</bgred>
                        <bggreen>255</bggreen>
                        <bgblue>255</bgblue>
                   </bgcolor>
                   <thickness>1</thickness>
                   <isfilled>false</isfilled>
              </shapeproperties>
         </shape>
    </vcmessage>The parser generally stops around the </bgcolor> tag.
    I'm using Eclypse as my IDE. I'm wondering if there's something wrong with it? Or maybe there's something wrong with the class I'm using for reading in the XML? Followng is the class.
    Please advise,
    Alan
    package vcclient;
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import javax.xml.parsers.*;
    public class XMLDocumentReader extends DefaultHandler
      private VCClient client = null;
      private Writer out;
      private String lineEnd =  System.getProperty("line.separator");
      private boolean haveSourceType = false;
      private boolean haveUserName = false;
      private boolean haveMessage = false;
      private boolean haveProcessEvent = false;
      private boolean haveLinkedListIndex = false;
      private boolean haveOpeningShapePropertiesTag = false;
      private boolean haveShapeType = false;
      private boolean haveOpeningShapeLocationTag = false;
      private boolean haveShapeLocation = false;
      private boolean haveOpeningXCoordTag = false;
      private boolean haveOpeningYCoordTag = false;
      private boolean haveOpeningBoundsTag = false;
      private boolean haveBoundsWidth = false;
      private boolean haveBoundsHeight = false;
      private boolean haveOpeningFGColorTag = false;
      private boolean haveOpeningBGColorTag = false;
      private boolean haveOpeningThicknessTag = false;
      private boolean haveOpeningIsFilledTag = false;
      private boolean haveOpeningImageDataTag = false;
      private boolean haveOpeningTextDataTag = false;
      private boolean haveFGRed = false;
      private boolean haveFGGreen = false;
      private boolean haveFGBlue = false;
      private boolean haveBGRed = false;
      private boolean haveBGGreen = false;
      private boolean haveBGBlue = false;
      private boolean haveThickness = false;
      private boolean haveIsFilled = false;
      private boolean haveImageData = false;
      private boolean haveTextData = false;
      private VCMessage vcmessage = null;
      public XMLDocumentReader(VCClient value)
           client = value;
           vcmessage = new VCMessage();
      public VCMessage getVCMessage()
           return vcmessage;
      public boolean haveSourceType()
         return haveSourceType; 
      public boolean ParseXML(InputStream stream)
         boolean success = false;
         // Use the default (non-validating) parser
        SAXParserFactory factory = SAXParserFactory.newInstance();
        try
             // Set up output stream
            out = new OutputStreamWriter(System.out, "UTF-8");
            // Parse the input
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse( stream, this );
            success = true;
        catch (SAXParseException spe)
            // Error generated by the parser
            System.out.println("\n** Parsing error"
               + ", line " + spe.getLineNumber()
               + ", uri " + spe.getSystemId());
            System.out.println("   " + spe.getMessage() );
            // Unpack the delivered exception to get the exception it contains
            Exception  x = spe;
            if (spe.getException() != null)
                x = spe.getException();
            x.printStackTrace();
            return success;
        catch (SAXException sxe)
             // Error generated by this application
             // (or a parser-initialization error)
             Exception  x = sxe;
             if (sxe.getException() != null)
                 x = sxe.getException();
             x.printStackTrace();
             return success;
        catch (ParserConfigurationException pce)
            // Parser with specified options can't be built
            pce.printStackTrace();
            return success;
        catch (Throwable t)
             t.printStackTrace();
             return success;
        return success;
      public void startDocument()throws SAXException
          emit("<?xml version='1.0' encoding='UTF-8'?>");
          nl();
      public void endDocument()throws SAXException
          try {
              nl();
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      public void startElement(String namespaceURI,
                               String lName, // local name
                               String qName, // qualified name
                               Attributes attrs)throws SAXException
          String eName = lName; // element name
          if (eName.equals(""))
             eName = qName; // namespaceAware = false
          emit("<"+eName);
          if (attrs != null) {
              for (int i = 0; i < attrs.getLength(); i++) {
                  String aName = attrs.getLocalName(i); // Attr name
                  if (aName.equals("")) aName = attrs.getQName(i);
                  emit(" ");
                  emit(aName + "=\"" + attrs.getValue(i) + "\"");
          emit(">");
          if(makeStartTag(eName).equals(Constants.OPENING_SHAPEPROPERTIES))
                haveOpeningShapePropertiesTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_SHAPELOCATION))
              haveOpeningShapeLocationTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BOUNDS))
                haveOpeningBoundsTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_FGCOLOR))
                 haveOpeningFGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGCOLOR))
              haveOpeningBGColorTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_BGGREEN))
               System.out.println("See BGGreen");
          else if(makeStartTag(eName).equals(Constants.OPENING_BGBLUE))
               System.out.println("See BGBlue");
          else if(makeStartTag(eName).equals(Constants.OPENING_THICKNESS))
              haveOpeningThicknessTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_ISFILLED))
              haveOpeningIsFilledTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_IMAGEDATA))
              haveOpeningImageDataTag = true;
          else if(makeStartTag(eName).equals(Constants.OPENING_TEXTDATA))
              haveOpeningTextDataTag = true;
      public void endElement(String namespaceURI,
                             String sName, // simple name
                             String qName  // qualified name
                            )throws SAXException
           if(sName.equals("") && !qName.equals(""))
              sName = qName;
              emit("</"+sName+">");
           else
              emit("</"+sName+">");
           if(makeEndTag(sName).equals(Constants.CLOSING_SOURCE_TYPE))
              haveSourceType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_USER))
              haveUserName = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_MESSAGE))
              haveMessage = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_PROCESSEVENT))
               haveProcessEvent = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_LINKEDLISTINDEX))
               haveLinkedListIndex = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPETYPE))
               haveShapeType = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPELOCATION))
                haveOpeningShapeLocationTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_WIDTH))
               haveBoundsWidth = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_HEIGHT))
               haveBoundsHeight = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BOUNDS))
                haveOpeningBoundsTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGRED))
               haveFGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGGREEN))
               haveFGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGBLUE))
               haveFGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_FGCOLOR))
                haveOpeningFGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGRED))
               haveBGRed = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGGREEN))
             haveBGGreen = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGBLUE))
               System.out.println("See closing BGBlue");
               haveBGBlue = true;
           else if(makeEndTag(sName).equals(Constants.CLOSING_BGCOLOR))
                haveOpeningBGColorTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_THICKNESS))
               System.out.println("XMLDocumentReader: Step2");
                haveOpeningThicknessTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_ISFILLED))
               haveOpeningIsFilledTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_IMAGEDATA))
               haveOpeningImageDataTag = false;
           else if(makeEndTag(sName).equals(Constants.CLOSING_TEXTDATA))
               haveOpeningTextDataTag = false;
      private String makeStartTag(String tag_name)
           String start = "<";
           String end = ">";
           return start.concat(tag_name).concat(end);
      private String makeEndTag(String tag_name)
           String start = "</";
           String end = ">";
           return start.concat(tag_name).concat(end);
      public void characters(char buf[], int offset, int len)throws SAXException
           String s = new String(buf, offset, len);
          if(haveSourceType == false)
               if(vcmessage.getSourceType() == null)
                  try
                    if(s.equals(""))return;
                   int sourcetype = Integer.parseInt(s);
                   vcmessage.setSourceType(sourcetype);                            
                  catch(NumberFormatException nfe){}
          else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE)
            if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveUserName == false)
                 vcmessage.setUserName(s);          
            else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveMessage == false)
               //When the parser encounters interpreted characters like: & or <,
               //then this method gets invoked more than once for the whole message.
               //Therefore, we need to concatonate each portion of the message.  The
               //following method call automatically concatonates.
               vcmessage.concatMessage(s);                    
          else if(vcmessage.getSourceType() == SourceType.WHITEBOARD_SOURCE)
               if(haveProcessEvent == false)
                 try
                   vcmessage.setProcessEvent(Integer.parseInt(s));
                 catch(NumberFormatException nfe){}
               else if(haveLinkedListIndex == false)
                    try
                       vcmessage.setLinkedListIndex(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               else if(haveShapeType == false)
                    try
                       vcmessage.setShapeType(Integer.parseInt(s));
                     catch(NumberFormatException nfe){}
               if(haveOpeningShapePropertiesTag)
                    if(haveOpeningShapeLocationTag)
                         if(haveOpeningXCoordTag)
                              try
                                vcmessage.setXCoordinate(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveOpeningYCoordTag)
                              try
                                vcmessage.setYCoordinate(Integer.parseInt(s));
                                //reset all flags for ShapeLocation, X and Y coordinates
                                haveOpeningXCoordTag = false;
                                haveOpeningYCoordTag = false;
                                //haveOpeningShapeLocationTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBoundsTag)
                         if(haveBoundsWidth == false)
                              try
                                vcmessage.setBoundsWidth(Integer.parseInt(s));
                              catch(NumberFormatException nfe){}
                         else if(haveBoundsHeight == false)
                              try
                                vcmessage.setBoundsHeight(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBoundsTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningFGColorTag)
                         if(haveFGRed == false)
                              try
                                vcmessage.setFGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGGreen == false)
                              try
                                vcmessage.setFGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveFGBlue == false)
                              try
                                vcmessage.setFGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningFGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningBGColorTag)
                         if(haveBGRed == false)
                              try
                                vcmessage.setBGRed(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGGreen == false)
                              try
                                vcmessage.setBGGreen(Integer.parseInt(s));                           
                              catch(NumberFormatException nfe){}
                         else if(haveBGBlue == false)
                         {   System.out.println("getting BGBlue data");
                              try
                                vcmessage.setBGBlue(Integer.parseInt(s));
                                //reset flag
                                //haveOpeningBGColorTag = false;
                              catch(NumberFormatException nfe){}
                    else if(haveOpeningThicknessTag)
                         try
                            vcmessage.setThickness(Integer.parseInt(s));                       
                          catch(NumberFormatException nfe){}
                    else if(haveOpeningIsFilledTag)
                         vcmessage.setIsFilled(s);
                    else if(haveOpeningImageDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setBase64ImageData(s);                    
                    else if(haveOpeningTextDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
                         vcmessage.setTextData(s);
                    //reset
                    haveOpeningShapePropertiesTag = false;
          emit(s);
      //===========================================================
      // Utility Methods ...
      //===========================================================
      // Wrap I/O exceptions in SAX exceptions, to
      // suit handler signature requirements
      private void emit(String s)throws SAXException
          try {
              out.write(s);
              out.flush();
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      // Start a new line
      private void nl()throws SAXException
          try {
              out.write(lineEnd);
          } catch (IOException e) {
              throw new SAXException("I/O error", e);
      //treat validation errors as fatal
      public void error(SAXParseException e)
      throws SAXParseException
        throw e;
      // dump warnings too
      public void warning(SAXParseException err)
      throws SAXParseException
        System.out.println("** Warning"
            + ", line " + err.getLineNumber()
            + ", uri " + err.getSystemId());
        System.out.println("   " + err.getMessage());
    }

    Just out of curiosity what happens if you append a space to the end of the XML document?

  • String representation of the xml document

    hi, I have created the following xml document using the DOM api. I want to the "function" to return a "string" - which represents the xml document i created. How do u do that?
    As of now it doesnt return anything...
    How do u return the entire xml document as character data..? just like
    <root><elements>data</elements></root>....
    anyhelp would be great.
    import java.io.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.*;
    public class test1{
    private static void function()throws IOException, DOMException{
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance ();
    DocumentBuilder db = dbf.newDocumentBuilder ();
    Document doc = db.newDocument ();
    Element record = doc.createElement ("record");
    Element name = doc.createElement ("name");
    Element address = doc.createElement ("address");
    Element zip = doc.createElement ("zip");
    Text nameText = doc.createTextNode("bill");
    Text addressText = doc.createTextNode("128, washington");
    Text zipText = doc.createTextNode("10000");
    doc.appendChild(record);
    record.appendChild(name);
    name.appendChild(nameText);
    record.appendChild(address);
    address.appendChild(addressText);
    record.appendChild(zip);
    zip.appendChild(zipText);
    public static void main (String argv [])throws Exception {
    function();
    }

    Brent,
    Looks like you're using the Sun Java Parser. I'll show you how to do it with the Oracle XML Parser and you can extrapolate...
    Document doc = new XMLDocument();
    // Stuff here to build up the DOM Doc
    // with elements, etc.
    // Print the Document to a String
    StringWriter sw = new StringWriter();
    // Wrap the stringwriter in a printwriter
    PrintWriter pw = new PrintWriter(sw);
    // Print to the printwriter
    ((XMLDocument)doc).print(pw);
    // return the string from the stringwriter
    return sw.toString();

  • Problem to validate XML document if the type of root element is abstract

    I have the following XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <ct013/>
    It corresponds to the following XSD Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="ct013" type="foo"/>
         <xs:complexType abstract="true" name="foo"/>
         <xs:complexType name="fixedType">
              <xs:complexContent>
                   <xs:restriction base="foo"/>
              </xs:complexContent>
         </xs:complexType>
    </xs:schema>
    Please take attention to the fact that the type of root element of that BDD is abstract.
    XML Schema provides a mechanism to force substitution for a particular element or type. When an element or type is declared to be "abstract", it cannot be used in an instance document. When an element is declared to be abstract, a member of that element's substitution group must appear in the instance document. When an element's corresponding type definition is declared as abstract, all instances of that element must use xsi:type to indicate a derived type that is not abstract.
    Declaring an element as abstract requires the use of a substitution group. Declaring a type as abstract simply requires the use of a type derived from it (and identified by the xsi:type attribute) in the instance document.
    For more information of using abstract types please see chapter 4.7 Abstract Elements and Types of XML Schema Part 0: Primer Second (http://www.w3.org/TR/xmlschema-0/#abstract).
    In this case there is Oracle bug when I try to validate this XML document using Oracle XDK:
    String validate(String xml, String schema)
    throws XSDException, XMLParseException, SAXException, IOException
    System.setPropert("oracle.xml.parser.debugmode", "true");
    XSDValidator xsdValidator = new XSDValidator();
    XMLError xmlError = new XMLError();
    xmlError.setErrorHandler(new DocErrorHandler());
    XMLDocument xmlDocument = parseXMLDocument(xml);
    XMLDocument schemaXMLDocument = parseXMLDocument(schema);
    XMLSchema xmlSchema = (XMLSchema) new XSDBuilder().build(schemaXMLDocument, null);
    xsdValidator.setError(xmlError);
    xsdValidator.setSchema(xmlSchema);
    xsdValidator.validate(xmlDocument);
    return getValidationError(xsdValidator);
    I get the following error:
    Can't find resource for bundle oracle.xml.mesg.XMLResourceBundle, key XSD-2046.
    I tried to validate this XML document using two other libraries - XSD Schema Validator (http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx) and xsdvalid-29 (http://www.w3.org/XML/Schema#XSDValid). Both libraries pointed me on the error that the type of root element is abstract and it cannot be used for doing validation.
    I think that Oracle should return me explaining message but not to throw exception.
    Am I right? Is there really Oracle bug or I miss something?
    Any help, hits, advices would be gratfully apriciated.

    Define Element1 as follows:
    <xs:element name="Element1">
    <xs:complexType>
    <xs:complexContent>
    <xs:restriction base="xs:string"/>
    </xs:complexContent>
    </xs:complexType>
    </xs:element>
    Does the XML document get validated if the element is specified as
    <Element1></Element1>

Maybe you are looking for

  • Can I split a landscape page in half to print as two portrait pages?

    Re-posting: I originally posted this in the wrong forum. Sorry. Adobe Reader 8.x Windows XP, SP2 Im a complete novice, having only ever read documents, as PDFs, and not created them. I have a PDF catalogue, where each landscape page consists of two o

  • MMS messaging

    I have a moto g and I am having problems receiving MMS messages. I can I receive then if I have my data on but when I don't it doesn't even tell me I have a message waiting to be downloaded. Also when I have my data and WiFi on at the same time I sti

  • "missing plug-in" for safari after downloading!

    So everytime i try to view a PDF file in safari it keeps saying i have a missing plug-in. when i click it, it leads me to adobe reader which i dowloaded and yet it still has the missing plug-in. i have redowloaded it many times and still no luck. mac

  • HT4623 ios is crashing

    Certain apps (Safari, Dropbox, Atomic Browser...) are crashing when certain pages are being called up.  There seems to be a correlation to pdf's when opening an online document.  The iPad is first generation and up to date with IOS version.

  • RAID Setup on Mac Pro with OS X 10.5.2 Server Software

    Hello All, Have Mac Pro Tower 2.66 GHZ with Leopard Server OS X 10.5.2 installed, all software up to date, 2 GB RAM and 3 Hard Drives, 250 GB with System and Users, 2 by 500 GB I want to set-up in RAID 1 Configuration to mirror the 250 GB Start-up Dr