Colons within document stored as XMLtype

Have uploaded a document in a 10g database, the document has : within the element names. We received the errors
ORA-31011:XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//a:b'
Have discovered that the problem is the : . This worked fine in on an Oracle 9.2 database but now on a 10 release 2 we get this error. Is there any way to work around this without having to change the original xml document

This was my original code to extract the values. I am extracting from a word document saved as xml.
CURSOR c_get_values is
SELECT substr(replace
(replace
(replace
(replace(m.xml_doc_type.extract('//wt').GetClobVal(),'<w:t Xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">',''),'</wt>',''),
'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"/>',''),chr(10),''),
instr(replace(replace(replace(replace(m.xml_doc_type.extract('//wt').GetClobVal(),
'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">',''),'</wt>',''),'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"/>',''),chr(10),''),v_search1) + length(v_search1),instr(replace(replace(replace(replace(m.xml_doc_type.extract('//wt').GetClobVal(),'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">',''),'</wt>',''),'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"/>',''),chr(10),''),v_search2) - (instr(replace(replace(replace(replace(m.xml_doc_type.extract('//wt').GetClobVal(),'<w:t xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">',''),'</wt>',''),'<w:t xmlns:w="http://schema--s.microsoft.com/office/word/2003/wordml"/>',''),chr(10),''),v_search1) + length(v_search1)) ) return_value
FROM temp m
WHERE upper(file_name) = UPPER(v_file_name)
AND id = 2 ;
here is an extract from the document.
     <w:tr>
     <w:trPr>
<w:trHeight w:val="567"/>
</w:trPr>
     <w:tc>
     <w:tcPr>
<w:tcW w:w="3338" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="C0C0C0"/>
<w:vAlign w:val="center"/>
</w:tcPr>
     <w:p>
     <w:pPr>
<w:pStyle w:val="Heading2"/>
</w:pPr>
     <w:r>
<w:t>USER_LOCATION</w:t>
</w:r>
</w:p>
</w:tc>
     <w:tc>
     <w:tcPr>
<w:tcW w:w="6721" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="FFFFFF"/>
<w:vAlign w:val="center"/>
</w:tcPr>
     <w:p>
     <w:pPr>
     <w:rPr>
<w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/>
<wx:font wx:val="Arial"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
</w:rPr>
</w:pPr>
     <st1:City w:st="on">
     <st1:place w:st="on">
     <w:r>
     <w:rPr>
<w:rFonts w:ascii="Arial" w:h-ansi="Arial" w:cs="Arial"/>
<wx:font wx:val="Arial"/>
<w:sz w:val="20"/>
<w:sz-cs w:val="20"/>
</w:rPr>
<w:t>Edinburgh</w:t>
</w:r>
</st1:place>
</st1:City>
</w:p>
</w:tc>
</w:tr>
I have amended the code to extract the clob, then amend the data to remove the : and then insert into a table as an XMLType. Would be better if didn't have to do this.

Similar Messages

  • View XML / HTML  Documents Stored in Oracle DB

    I need to build an application where a user can enter in basic query criteria and I need to return the appropriate XML (transformed by a specified XSL stylesheet) or static HMTL document stored as XMLTYPE or CLOB in the DB. Is it feasible to build such an application in Apex or do I need to build a JSP based application?
    Any other options?
    Thanks,
    Chris

    It is quite feasible (and quite easy) to do this via XMLDB. You can even create an Oracle Text index on the XML (or binary for Word documents, pdf etc) for fast case insensitive searching. Look at the XMLDB documentation, especially the sql access to the resource_view.
    Mike

  • The size of a XML document stored in a XMLType table

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

  • Read xml-structure from a xml-document stored in a xmltype-column?

    Hello,
    I have several xml-documents stored in a table with a xmltype-column.
    Is it possible to read the structure of one xml-document? I need to know what data are exists in the xml-documents.
    I had read some hours here, but I dont find a suitable solution for that.
    To make a example, what I need:
    I have stored the following xml-document in the table:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="6">
    <EMPLOYEE_ID>105</EMPLOYEE_ID>
    <FIRST_NAME>David</FIRST_NAME>
    <LAST_NAME>Austin</LAST_NAME>
    <EMAIL>DAUSTIN</EMAIL>
    <PHONE_NUMBER>590.423.4569</PHONE_NUMBER>
    <HIRE_DATE>6/25/1997 0:0:0</HIRE_DATE>
    <JOB_ID>IT_PROG</JOB_ID>
    <SALARY>4800</SALARY>
    <MANAGER_ID>103</MANAGER_ID>
    <DEPARTMENT_ID>60</DEPARTMENT_ID>
    </ROW>
    </ROWSET>
    I need to return the following:
    ROWSET
    ...ROW
    ......EMPLOYEE NUMBER
    ......FIRST_NAME VARCHAR2
    ......DEPARTMENT_ID NUMBER
    Regards,
    Mark

    Hi,
    I was on a wrong way. The datatype is not stored in xml, this was a mistake from me.
    I needed something to printout some values from a xml-file. This xml-file was generated bei MS Excel. The data are in /Workbook/Worksheet/Table/Cell and I didnt know how to access it.
    I write for that the following:
    DECLARE
    v_xml XMLType;
    v_doc dbms_xmldom.DOMDocument;
    v_node dbms_xmldom.DOMNode;
    type t_values is table of varchar2(2000) index by binary_integer;
    v_values t_values;
    type t_table is table of t_values index by binary_integer;
    v_table t_table;
    procedure node_output (v_node in out dbms_xmldom.DOMNode)
    is
    v_nodelist1 DBMS_XMLDOM.DOMNodeList;
    v_nodelist2 DBMS_XMLDOM.DOMNodeList;
    v_anzahlnodes number;
    v_anzahlrows number;
    v_node_c dbms_xmldom.DOMNode;
    v_xmlmitarbeiterid number;
    begin
    v_nodelist1 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlrows := DBMS_XMLDOM.GETLENGTH(v_nodelist1);
    if v_anzahlrows = 0 or DBMS_XMLDOM.GETNODENAME(v_node) = 'Table'
    then
    if v_anzahlrows > 0
    then
    for i1 in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i1);
    v_nodelist2 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlnodes := DBMS_XMLDOM.GETLENGTH(v_nodelist2);
    for i2 in 0..v_anzahlnodes - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist2,i2);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node_c);
    v_values(i2) := DBMS_XMLDOM.GETNODEVALUE(v_node_c);
    end loop;
    v_table(i1) := v_values;
    end loop;
    for i1 in 1..v_anzahlrows - 1
    loop
    select SEQ_XMLMITARBEITER.nextval into v_xmlmitarbeiterid from dual;
    for i2 in 1..v_table(i1).count - 1
    loop
    dbms_output.put_line(v_table(i1)(i2));
    end loop;
    end loop;
    end if;
    else
    v_node := dbms_xmldom.GETFIRSTCHILD(v_node);
    for i in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i);
    node_output(v_node);
    end loop;
    end if;
    end;
    BEGIN
    select inhalt into v_xml FROM xmlimport WHERE name = 'F23973/mitarbeiter.xml';
    v_doc := dbms_xmldom.newDOMDocument(v_xml);
    v_node:= dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(v_doc));
    node_output(v_node);
    END;
    This gives me all data from a xml-Excel-file. Is there a better way to do that? I have Oracle 10.2.
    Regards,
    Mark

  • Modifying MS WORD documents stored in BLOBS. (Oracle 9i Release 9.2.0.4.0)

    I have a need to replace a string of characters in an MS Word document that is stored in a BLOB field in an Oracle 9i database.
    Background: We have a large number of MS Word documents (~50,000) and many of them contain links to other Word documents stored on various servers throughout our network. We are moving a number of these servers, thus invalidating these links. I need to be able to update these links without having to open up every one of these documents and doing it manually.
    Is it possible, using PL/SQL, to update these links in these MS Word documents that are stored in Oracle? I have currently written a quick PL/SQL routine that will find the links and provide their location within the document, but I am not sure how I can update them. The problem, as I see it, is that if the characters that I am replacing differ in length than those that are currently in the existing document, then I would have to shift the remaining bytes of the document either left or right to preserve the integrity of the document.
    Is this possible, or should I pursue another option?

    It does not have to manual, but I think you will need to use word to modify and save the documents.
    The most automated process I can think of would be to write a client program to fetch a blob, run word, and have a word macro or add in to make the edits save, and then the client program updates with the new blob.
    With that number of documents, I would probably try to fetch a bunch of blobs and have word process them all before updating them for performance reasons.
    Unfortunately I would have no clue how to do the word automation, but I wouldn't touch those blobs using pl/sql

  • Error on update of document stored in content server

    Error on update of document stored in content server
    On a regular basis (but not reproducible) we find that after updating a document, it is deleted from content server (or at least it cannot be retrieved).  These problems have only been experienced since we switched to using content server as our storage repository, as opposed to R/3.
    We create and maintain documents through a bespoke transaction, which calls standard SAP functions BDS_BUSINESSDOCUMENT_CREA_TAB and cl_bds_document_set=>update_with_table.
    Whilst the errored documents are listed in the BDS via transaction OAOR (business document navigator), an error is received when you try to display it (in our case an MS-Word error indicating file/pathname invalid). 
    We are satisfied that file/pathname are valid and find that this occurs occasionally when a document has been updated.  It appears that the document has been deleted. 
    This bespoke transaction has been running successfully for almost two years, and these problems have only been experienced after switching to content server as a storage repository (as opposed to R3 previously).  Has anyone else experienced these problems? 
    We are running :
    R/3 Enterprise 620,
    SAP HTTP Content Server Version 6.30 Patch 13
    SAPDB version 7.3.0.54

    Hi Sonny,
    To check the connectivity between your content server and Workstation and SAP Server.
    Pls goto the command prompt of your workstation
    give the command like this example.
    C:\>Ping 117.123.45.201
    you will get the reply from the server. here 117.123.45.201 is your content server IP.
    If you are getting the reply then it means that your contentserver and workstation are connected propely.
    Like that pls check the connectivity between your systems.
    Pls check the hosts file of your systems also.
    If the hosts file entry is not maintained, you can check-out file from content server but you cannot check-in the original.
    Pls let me know what kind of error Message you are getting?
    From where you are trying to check-in the Original? From the DIR screen or from CAD Desktop screen?
    Regards,
    MRK
    (reward points if useful)

  • Display PDF Documents Stored In Database

    Hi
    I apologise that this question has been asked many times, but I just do not seem to be able to find answer to my question in many other posts over the years.
    We have pdf documents stored in database and wish for client to view from forms session.
    I am able to use webutil_file_transfer.DB_To_Client_With_Progress to transfer to client and open using client_host('cmd /c start '||TheFile);
    I am also able to view pdf documents stored on application server using web.show_document.
    What I would prefer to do is:
    1. Transfer file from database to application server (This is bit I cannot figure out)
    2. Display from application server using web.show_document
    3. Delete temporary file from application server (Also unsure how to do this)
    Our users have thin clients and so in many cases do not have access or unsure where can access to store temporary file if use transfer to client method. Wish to keep temporary file activity on application server.

    You can combine the methods in WEBUTIL. Check this Re: Forms 10G - Saving Blob on Application Server using Java.

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

  • Creating a table/view or temporary table from within a stored procedure

    Hi Gurus,
    Can someone tell me if it is possible to create a table (or view) from within a stored procedure.
    PROBLEM:
    In fact I need to create a report at back end (without using oracle developer forms or reports). This report requires creating several tables to hold temporary report data. If I create a sql*plus script for this, i works fine, because it can run DDL and other sql or pl/sql statements sequencialy. But this sql*plus script cannot be called from application. So, application needs an stored procedure to do this task and then application call that procedure. But within stored procedure, i am unable to create table (or run any ddl statement). Can somebody help me in this?
    Thanks in Advance.

    Denis,
    The problem with Nicholas' suggestion isrelated to the fact that now you have two components
    (a table and a stored procedure)
    I don't see any problem to have "two
    components" here. After all, what about all others
    tabes ? This is only one more, but I don't understand
    why want manage less objects, that implies more code,
    more maintenance, and more difficulties to debug.
    Needless to say about performance...
    Nicolas.The same reasons apply if you were forced to declare all PL/SQL variables publicly (outside the stored proc.) rather than privately (from inside the stored proc). Naming conflicts for one. If the name that you want to use for the GTT already exists, you need to find a new name. With the SQL Server type local/private declarations, you wouldn't have that problem.
    I can see how performance would be the same or better using GTTs. If the number of records involved is low, this is likely negligable.

  • Retrieving data from document stored in External Server.

    Hello ,
    We are working on a PoC requirement in which the data from a document stored in an external server (not using DMS) needs to be read from a reprot program in SAPCRM. Is this possible to do from CRM. Can you please suggest if there are any standard function modules availalbe for this.
    Regards,
    Sudharani.

    Yes  Bhushan, we would be using XI but we are open for any other option if available. Please suggest. 
    Also are there any standard web services available for this purpose where in we can pass the URL of the document location and it returns of content of the document.

  • I can not open PDF document stored in Google drive

    I have down loaded Adobe PDF reader APP (Touch Type) but it is not opening my PDF documents stored in my google drive. It tells me error 403 (forbidden). Could some one explain how I can solve this problem.
    Thanks.
    Rajinder Kanda

    It depends on how you open the PDF documents that are stored in Google Drive.
    Do you access Google Drive via the web browser?  Or do you have a sync client app installed on your device?  Adobe Reader Touch itself does not display the error 403 (forbidden).
    Could you describe the steps that you used to open one of the PDF documents from Google Drive?  How did you choose Adobe Reader Touch to open it?

  • SharePoint 2013 - Document Set Capture Version History. Does each version captured for each document set keep a copy of all the document stored in the document set?

    Hi All,
    We have currently encountered an issue where even though version control is turned on in a document library, changes made to the metadata of a document set is not tracked in a version history. 
    We have found that in order to this a user will need to manually click on the capture version history button. 
    With this in mind, we are concerned about the impact of this on our storage. The question we have been trying to answer is whether each document set version:
    stores the change in metadata of the document set and a copy of all the documents stored in the document set
    stores the change in metadata of the document set and a reference to the documents stored in the document set (making use of SharePoint 2013's shredded storage)
    The reason we ask this is that if a document set version stores a copy of all the document stored in a document set, a change in one of the fields in the document set could result in the storage used to grow exponentially. e.g. if the document set contains
    documents totaling 30MB, and if we have 10 versions of the document set, we could take up 300 MB in the content database for just one document set.
    We have tried to some searching around Google but wasn't able to find any answers around this question. Would appreciate some assistance from anyone who has knowledge around how document set version history works. 
    Thanks in advance.
    John

    i had a long thing written out, but submit failed.  suffice to say it does "2".  it only stores the changes with pointers to the documents. 
    Christopher Webb | Microsoft Certified Master: SharePoint 2010 | Microsoft Certified Solutions Master: SharePoint Charter | Microsoft Certified Trainer| http://tealsk12.org Volunteer Teacher | http://christophermichaelwebb.com

  • Can Discoverer have link to display documents stored outside the database?

    I posted a message some time ago called "Possible for Discoverer to display BLOB type documents stored in database?" and got great answer.
    Now our customers are asking if it is possible, from Discoverer, to link somehow to a file stored outside the database on the Unix file system and get their computer to display it? Can anyone tell me if this is possible please?
    The only thing I've seen in the documentation that may be related is in Oracle Business Intelligence Discoverer Configuration Guide, section 10.6 List of Discoverer user preferences. It says there that Discoverer preference ProtocolList can be set so that Discoverer hyperlinks can be set to use protocols such as telnet, but the default is HTTP, HTTPS, and FTP.
    THank you in advance if you can help.
    Regards,
    Julie.

    Hi Rod,
    I have tried the second method: "create a Oracle directory pointing to the Unix directory containing the files". I have had success with it, but I'd be grateful if you could advise me if you would have done this the same way as described below:
    I put two Word docs and two text docs called clob_test1.txt, clob_test2.txt, blob_test1.doc, blob_test2 in the Unix directory corresponding to an Oracle directory called 'EIF'. I thought an extrenal table was needed so that Discoverer would have an object to write a queruy against. So I created a file called lob_test_data.txt with the following contents:
    1,01-JAN-2006,text/plain,clob_test1.txt
    2,02-JAN-2006,text/plain,clob_test2.txt
    3,01-JAN-2006,application/msword,blob_test1.doc
    4,02-JAN-2006,application/msword,blob_test2.
    THen I created an external table using the following DDL:
    CREATE TABLE jum_temp_lob_tab (
    file_id NUMBER(10),
    date_content DATE,
    mime_type VARCHAR2(100),
    blob_content BLOB
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EIF
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    BADFILE EIF:'lob_tab_%a_%p.bad'
    LOGFILE EIF:'lob_tab_%a_%p.log'
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
    file_id CHAR(10),
    date_content CHAR(11) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    mime_type CHAR(100),
    blob_filename CHAR(100)
    COLUMN TRANSFORMS (blob_content FROM LOBFILE (blob_filename) FROM (EIF) BLOB)
    LOCATION ('lob_test_data.txt')
    PARALLEL 2
    REJECT LIMIT UNLIMITED
    then created a Discoverer End User Layer folder against this external table, and used exactly the same technique as we did for downloading the BLOB from the database table (creating a new folder item containing a URL calling a database procedure which calls the Oracle code to download the doc). THis worked, but sometimes my PC didn't seem to know that the Word docs were Word docs and it needed to launch Word. Other times it did manage to do this OK. It always displayed the two .txt files as HTML docs.
    Just wondered if you'd be good enough to critique this approach.
    THank you, Julie.

  • Moving documents stored in NW04 internal DMS to external content server ...

    Hi all !
    is it possible to move documents, stored in NW04s databse (DMS) to an external content server;
    we want to swap all documents to an content server;
    thanks
    oliver

    Hi,
    We have to do the following post install activities to connect to Content server from DMS.
    On SAP Systems (ECC) using CSADMIN t-code we have done the following post installation steps to check whether  Content Server is reachable from SAP system.
    When use hit CSADMIN option on the screen
    Here we need to uncheck the Check Signature check box as we are not using certificates.
    Here we need to give HTTP server (Content Server ) info like host name and the port number service is(1090) running.
    2.  Using OAC0 t-code create Repository on SAP system (ECC)
    Then from here Hit  CS ADMIN to create rep on Content Server.
    Thnaks,
    Tanuj

  • Retrieving document stored in a variable

    <xsl:variable name="result" select="document('response-new.xml')" />
    will the above code store the content of the document in the variable result?
    If it stores how can we retrieve document from it?
    If it ll not how can we call a document stored in a drive into an xsl?
    Message was edited by:
    Aswathy_tvm

    Hi tvm..
    <xsl:variable name="result" select="document('response-new.xml')" />
    Giving this i dont thnk the ur xml document wld be stroed in the variable result.
    regards
    Shanu

Maybe you are looking for

  • COMMIT problem in TopLink, Struts, JSP and ADF Databinding sample

    In the sample Developing a J2EE Application using TopLink, Struts, JSP and ADF Databinding, I followed all the steps to build a department browse page and a edit page. But when I get to Step number 23 in "Create a JSP to Edit Departments" I have a pr

  • Group Policy Printers failing - Windows 8.1 Enterprise

    Been struggling with this for years, across the past several versions of Windows. Currently we're on Windows 8.1 Enterprise, deployed in a lab environment. I'd like to get the entire lab connected to a shared printer for any user who logs in. First o

  • Sun java Creator, Table component vanishes when associating with the table

    I am trying to develop JSF page with a table component and associating a table (users) to the table component. I have created datasource and i can see the data in the SQL editor in Sun Java Creator. But when i try to associate the table component wit

  • Accessing COM servers. Possible?

    Does LabVIEW provide a block or set of blocks for loading COM servers and calling methods in the COM server? I'm writing the server code which LabVIEW will eventually need to interact with and I can either package my code as a COM server, or maybe in

  • Applescript can't find files

    Applescript cannot find any files. Whether using Finder's exists command or any other way of trying to access a file, alias or not, it says the file cannot be found. I just had iCal also not be able to find a script that ran just fine yesterday. Noth