Solved

JDBC :problem in storing content of svg file into Oracle xmltype column

Posted on 2003-11-05
31
467 Views
Last Modified: 2008-03-10
HI ,guys
I'm trying to insert content of SVG file into xmltype column in Oracle DB
I must insert it into xmltype column
but after executing the  pstmt.executeUpdate();
it jumps to exception and I get something like this:  
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00256: invalid element
I soppose  I do it wrong way ,do somebody knows how to insert svg file content
 to xmltype column  
Thanks in advance

create table AD_ASSETS_CONTENTS_CHAR (CONTENT_SVG xmltype);
(all *.svg  files are in utf-8 format )

try
{
 String query ="Insert into AD_ASSETS_CONTENTS_CHAR "+
               "(CONTENT_SVG) values (xmltype(?)) ";

                File f = new File ( "c:/test/350.svg" );
                InputStream in = new FileInputStream(f);


              PreparedStatement pstmt = connection.prepareStatement(query);
              pstmt.setAsciiStream(1,in,in.available());    
              pstmt.executeUpdate();
              pstmt.close();
}
      catch (Exception e)
      {
                  e.printStackTrace();  
      }







0
Comment
Question by:AnnaBZ
  • 13
  • 6
  • 6
  • +2
31 Comments
 
LVL 35

Expert Comment

by:girionis
Comment Utility
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
> ORA-31011: XML parsing failed

  THis actually indicates a failure in parsing. Can you make sure your XML is well formed and valid?
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
I've had a go at using your code to put a very simple XML document into the database, and it worked fine.  I would suggest running you SVG document through an XML validator to ensure that it is valid.  Also, it might help if you post your SVG file.

Try a simple XML document, (i.e. <test><does><it><work /></it></does></test>), and see if that works.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
> LPX-00256: invalid element

  This probably indicates the problem.
0
 
LVL 15

Expert Comment

by:jimmack
Comment Utility
I knew I should have commented when I first read the question ;-)

I was going to say that it looked like the XML was not well formed and/or valid and that LPX-00256 was probably the root cause.

I didn't bother because I wasn't sure what format SVG was :-(

Maybe next time ;-)
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 jimmack, be fast or be last :)
0
 
LVL 15

Expert Comment

by:jimmack
Comment Utility
The problem seems to be that as soon as objects goes to sleep, girionis wakes up.  When you go away, CEHJ pops up.
;-)

At least I now know that SVG is XML ;-)
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 Hehe :) Not strictly true... Lately I can't participate as much as I used to do... I mainly clean abandoned questions now :)
0
 
LVL 15

Expert Comment

by:jimmack
Comment Utility
Ah.  Perhaps that's why I've managed to pick up some points between the binary black holes of objects and CEHJ then ;-)

TimYates is another one.  Wasn't he panicking recently, 'cos you were catching up? ;-)
0
 

Author Comment

by:AnnaBZ
Comment Utility
This is an SVG file grim_toaster , it is bigger then 4000 characters so I cannot use String

<?xml version = '1.0' encoding = 'utf-8'?>
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG Version: 3.0.0 Build 76)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<?AdobeSVGViewer save="snapshot"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" width="179.0" height="63.62399673461914" viewBox="0 0 179.0 63.62399673461914" overflow="visible" enable-background="new 0 0 179.0 63.62399673461914" xml:space="preserve">
     <style type="text/css">
   
                @font-face{font-family:'AvantGarde-Demi';src:url(../../../fonts/A746586D.cef)}
   
                @font-face{font-family:'AINarkissTam-Medium';src:url(../../../fonts/6F2751A9.cef)}
   
                @font-face{font-family:'AINarkisTamB';src:url(../../../fonts/63027B3C.cef)}
   
                @font-face{font-family:'AIKislev';src:url(../../../fonts/96084A9E.cef)}
   
                @font-face{font-family:'Grafitti';src:url(../../../fonts/7A6FFD77.cef)}
   
                @font-face{font-family:'ZapfDingbats';src:url(../../../fonts/90A2E2BB.cef)}
     </style>
     <g id="MM1">
        <g id="framepath">
           <path fill="#ffffff" stroke="#000000" stroke-miterlimit="10" d="M48.165,12.333330631256104H0v55.290665h179.0V14.333330631256104"/>
        </g>
        <metadata ad_id="498" obj_type="&#1502;&#1502;1" ad_price="556" sort_key="116900" text_sort_key="&#1505;&#1504;&#1492; &#1500;&#1506;&#1489; &#1505;&#1489;&#1490;" obj_fam="2" cust_id="69366600" cust_sort="#cust_sort" book="52" year="2003" class_id="25410" class_name="PARTITIONS - PLASTER" framewidth="179.0" align="right" indent-left="0" indent-right="0" language="HE" direct="rtl"/>
        <g id="freetext">
           <g id="freetext1"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 12.869995 59.45733022689819)" style="font-family:'AvantGarde-Demi'; font-size:12.5; fill:#00ff00">1234-567</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 67.895 59.45733022689819)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#0000ff">±°¯· àøâ ïá ãåäà úâ úéø÷</text>
           </g>
           <g id="freetext2"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 9.817505 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">°µ¶­·¶´´´°</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 64.84251 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">íéììë íéöåôéùå òáö úåãåáò</text>
           </g>
           <g id="freetext3"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.765625 0 0 1 13.917503 29.290831089019775)" style="font-family:&#39;AINarkisTamB&#39;; font-size:16.0; fill:#ff0000">ñáâ úåöéçî ¬úåéèñå÷à úåø÷ú</text>
           </g>
        </g>
        <g id="Businessname">
           <g id="BusinessName4"><metadata align="right" indent-left="0.0" indent-right="0.0"/>
              <text transform="matrix(0.74 0 0 1 51.165 12.333330631256104)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">ïäã óñåé ­ ¢ñðä ìòá ñá⢠­ ã¢ñá</text>
           </g>
        </g>
     </g>
</svg>
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
> This is an SVG file grim_toaster , it is bigger then 4000 characters so I cannot use String

  Why don't you load it up in an XML editor and validate it?

  jimmack:

> TimYates is another one.

  Yeap and he has already left me behind... I need to work harder :)
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
> Yeap and he has already left me behind... I need to work harder :)

Hee hee, or "work" less hard, and EE more ;-)  *giggle*
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
> or "work" less hard, and EE more

  Heheh Tim, so true :)
0
 

Author Comment

by:AnnaBZ
Comment Utility
Why don't you load it up in an XML editor and validate it?

Guy's , I'm quite new in Java and Xml  and here too ,so I don't know how to use XML editor,
But my code (upper ) works if I pass is a simple xml string , but my file bigger then 4000,
so I cannot pass it as string  and that is why I use  pstmt.setAsciiStream(..,..,..)
Maybe here should be something else?
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 If the size of xmltype column is limited you might need to use a BLOB or CLOB type.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 15

Expert Comment

by:jimmack
Comment Utility
My XML isn't that strong, so I'm not sure if this is going to help or hinder, but my XML editor complained about the file you posted:

Error while parsing XML: Cannot create entity declaration in document type declaration

This appears to be a problem with the line at the top of the file that begins:

<!ENTITY ns_flows ...

0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 Look here:

http://edocs.bea.com/wls/docs81/jdbc_drivers/oracle.html

  An Oracle XMLTYPE is a CLOB jdbc type.
0
 

Author Comment

by:AnnaBZ
Comment Utility
no the size of xmltype column is not limited and I must use xmltype column and not BLOB or CLOB type.
And I'm sure that there is no problem with a svg file ,because i cal view it throw Enternet Explorer

I looked here girionis
 http://edocs.bea.com/wls/docs81/jdbc_drivers/oracle.html
And it works greate ,but with string , which I can't use
0
 
LVL 15

Expert Comment

by:jimmack
Comment Utility
Am I missing something here?  As far as I can tell, XMLTYPE isn't an SQL column type.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 Right, lets elimitae possible causes first.

  Can you make sure that this line:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG- 20010904/DTD/svg10.dtd"

  is as follows:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"

  Please eliminate the space between SVG- and 20010904 and try again.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
> As far as I can tell, XMLTYPE isn't an SQL column type.

  This type only exists in Oracle 9i and correlates to CLOB in JDBC types.
0
 
LVL 15

Expert Comment

by:jimmack
Comment Utility
>> This type only exists in Oracle 9i and correlates to CLOB in JDBC types.

Bingo.  Goal for the day achieved.  I learned something new and potentially useful ;-)
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
Here's something to try, to find out what area the problem is in, whether it is the database formatting, or the way the xml document is transfered, might I suggest running the insert script directly into your Oracle database (via SQLPlus).

Put the following into a script file and run it, and just to check, you do have internet access from the machines involved to resolve the external references???

INSERT INTO AD_ASSETS_CONTENTS_CHAR VALUES (XMLType.CreateXML('<?xml version = "1.0" encoding =
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG Version: 3.0.0 Build 76)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<?AdobeSVGViewer save="snapshot"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="htt
     <style TYPE="text/css">
                @font-face{font-family:"AvantGarde-Demi";src:url(../../../fonts/A746586D.cef)}
                @font-face{font-family:"AINarkissTam-Medium";src:url(../../../fonts/6F2751A9.cef)}
                @font-face{font-family:"AINarkisTamB";src:url(../../../fonts/63027B3C.cef)}
                @font-face{font-family:"AIKislev";src:url(../../../fonts/96084A9E.cef)}
                @font-face{font-family:"Grafitti";src:url(../../../fonts/7A6FFD77.cef)}
                @font-face{font-family:"ZapfDingbats";src:url(../../../fonts/90A2E2BB.cef)}
     </style>
     <g id="MM1">
        <g id="framepath">
           <path fill="#ffffff" stroke="#000000" stroke-miterlimit="10" d="M48.165,12.333330631256104H0v55
        </g>
        <metadata ad_id="498" obj_type="&#1502;&#1502;1" ad_price="556" sort_key="116900" text_sort
        <g id="freetext">
           <g id="freetext1"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 12.869995 59.45733022689819)" style="font-f
              <text id="freetext" transform="matrix(0.74 0 0 1 67.895 59.45733022689819)" style="font-fami
           </g>
           <g id="freetext2"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 9.817505 44.99883031845093)" style="font-fa
              <text id="freetext" transform="matrix(0.74 0 0 1 64.84251 44.99883031845093)" style="font-fa
           </g>
           <g id="freetext3"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.765625 0 0 1 13.917503 29.290831089019775)" style="f
           </g>
        </g>
        <g id="Businessname">
           <g id="BusinessName4"><metadata align="right" indent-left="0.0" indent-right="0.0"/>
              <text transform="matrix(0.74 0 0 1 51.165 12.333330631256104)" style="font-family:&#39;AINar
           </g>
        </g>
     </g>
</svg>
'))
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
 It is complaining for the "ad_id" attribute in the "metadata" tag. Check if this attribute is valid.

  Also it is complaining for the closing tag "</ text>" of the <text id="freetext" transform="matrix(0.74 0 0 1 9.817505 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000"> (note the space between the "/" symbol and "text")

  And it is also complaining for the space at the end (between "/" and ">") of the following line:

<metadata align="right" indent-left="0.0" indent-right="0.0"/ >

  Please correct the last two problems first and then the first one and try again.
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
Oops, sorry, my update query should have read as below (truncated by SQLPlus), your document seems well formed, but I am unable to test myself as my database does not allow some of those characters, but the concept should (but I did try after removing them, and it worked!)!:

INSERT INTO AD_ASSETS_CONTENTS_CHAR VALUES (XMLType.CreateXML('<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG Version: 3.0.0 Build 76)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<?AdobeSVGViewer save="snapshot"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" width="179.0" height="63.62399673461914" viewBox="0 0 179.0 63.62399673461914" overflow="visible" enable-background="new 0 0 179.0 63.62399673461914" xml:space="preserve">
     <style type="text/css">
   
                @font-face{font-family:"AvantGarde-Demi";src:url(../../../fonts/A746586D.cef)}
   
                @font-face{font-family:"AINarkissTam-Medium";src:url(../../../fonts/6F2751A9.cef)}
   
                @font-face{font-family:"AINarkisTamB";src:url(../../../fonts/63027B3C.cef)}
   
                @font-face{font-family:"AIKislev";src:url(../../../fonts/96084A9E.cef)}
   
                @font-face{font-family:"Grafitti";src:url(../../../fonts/7A6FFD77.cef)}
   
                @font-face{font-family:"ZapfDingbats";src:url(../../../fonts/90A2E2BB.cef)}
     </style>
     <g id="MM1">
        <g id="framepath">
           <path fill="#ffffff" stroke="#000000" stroke-miterlimit="10" d="M48.165,12.333330631256104H0v55.290665h179.0V14.333330631256104"/>
        </g>
        <metadata ad_id="498" obj_type="&#1502;&#1502;1" ad_price="556" sort_key="116900" text_sort_key="&#1505;&#1504;&#1492; &#1500;&#1506;&#1489; &#1505;&#1489;&#1490;" obj_fam="2" cust_id="69366600" cust_sort="#cust_sort" book="52" year="2003" class_id="25410" class_name="PARTITIONS - PLASTER" framewidth="179.0" align="right" indent-left="0" indent-right="0" LANGUAGE="HE" direct="rtl"/>
        <g id="freetext">
           <g id="freetext1"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 12.869995 59.45733022689819)" style="font-family:"AvantGarde-Demi"; font-size:12.5; fill:#00ff00">1234-567</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 67.895 59.45733022689819)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#0000ff">±°¯· àøâ ïá ãåäà úâ úéø÷</text>
           </g>
           <g id="freetext2"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 9.817505 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">°µ¶­·¶´´´°</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 64.84251 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">íéììë íéöåôéùå òáö úåãåáò</text>
           </g>
           <g id="freetext3"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.765625 0 0 1 13.917503 29.290831089019775)" style="font-family:&#39;AINarkisTamB&#39;; font-size:16.0; fill:#ff0000">ñáâ úåöéçî ¬úåéèñå÷à úåø÷ú</text>
           </g>
        </g>
        <g id="Businessname">
           <g id="BusinessName4"><metadata align="right" indent-left="0.0" indent-right="0.0"/>
              <text transform="matrix(0.74 0 0 1 51.165 12.333330631256104)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">ïäã óñåé ­ ¢ñðä ìòá ñá⢠­ ã¢ñá</text>
           </g>
        </g>
     </g>
</svg>'))


SQLPlus INSERT INTO AD_ASSETS_CONTENTS_CHAR VALUES (XMLType.CreateXML('<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 10.0, SVG Export Plug-In . SVG Version: 3.0.0 Build 76)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<?AdobeSVGViewer save="snapshot"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" width="179.0" height="63.62399673461914" viewBox="0 0 179.0 63.62399673461914" overflow="visible" enable-background="new 0 0 179.0 63.62399673461914" xml:space="preserve">
     <style type="text/css">
   
                @font-face{font-family:"AvantGarde-Demi";src:url(../../../fonts/A746586D.cef)}
   
                @font-face{font-family:"AINarkissTam-Medium";src:url(../../../fonts/6F2751A9.cef)}
   
                @font-face{font-family:"AINarkisTamB";src:url(../../../fonts/63027B3C.cef)}
   
                @font-face{font-family:"AIKislev";src:url(../../../fonts/96084A9E.cef)}
   
                @font-face{font-family:"Grafitti";src:url(../../../fonts/7A6FFD77.cef)}
   
                @font-face{font-family:"ZapfDingbats";src:url(../../../fonts/90A2E2BB.cef)}
     </style>
     <g id="MM1">
        <g id="framepath">
           <path fill="#ffffff" stroke="#000000" stroke-miterlimit="10" d="M48.165,12.333330631256104H0v55.290665h179.0V14.333330631256104"/>
        </g>
        <metadata ad_id="498" obj_type="&#1502;&#1502;1" ad_price="556" sort_key="116900" text_sort_key="&#1505;&#1504;&#1492; &#1500;&#1506;&#1489; &#1505;&#1489;&#1490;" obj_fam="2" cust_id="69366600" cust_sort="#cust_sort" book="52" year="2003" class_id="25410" class_name="PARTITIONS - PLASTER" framewidth="179.0" align="right" indent-left="0" indent-right="0" LANGUAGE="HE" direct="rtl"/>
        <g id="freetext">
           <g id="freetext1"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 12.869995 59.45733022689819)" style="font-family:"AvantGarde-Demi"; font-size:12.5; fill:#00ff00">1234-567</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 67.895 59.45733022689819)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#0000ff">±°¯· àøâ ïá ãåäà úâ úéø÷</text>
           </g>
           <g id="freetext2"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.74 0 0 1 9.817505 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">°µ¶­·¶´´´°</text>
              <text id="freetext" transform="matrix(0.74 0 0 1 64.84251 44.99883031845093)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">íéììë íéöåôéùå òáö úåãåáò</text>
           </g>
           <g id="freetext3"><metadata align="center" indent-left="3.0" indent-right="3.0"/>
              <text id="freetext" transform="matrix(0.765625 0 0 1 13.917503 29.290831089019775)" style="font-family:&#39;AINarkisTamB&#39;; font-size:16.0; fill:#ff0000">ñáâ úåöéçî ¬úåéèñå÷à úåø÷ú</text>
           </g>
        </g>
        <g id="Businessname">
           <g id="BusinessName4"><metadata align="right" indent-left="0.0" indent-right="0.0"/>
              <text transform="matrix(0.74 0 0 1 51.165 12.333330631256104)" style="font-family:&#39;AINarkisTamB&#39;; font-size:12.5; fill:#000000">ïäã óñåé ­ ¢ñðä ìòá ñá⢠­ ã¢ñá</text>
           </g>
        </g>
     </g>
</svg>'))
0
 

Author Comment

by:AnnaBZ
Comment Utility
hi grim_toaster
I tried this  INSERT INTO AD_ASSETS_CONTENTS_CHAR VALUES (XMLType.CreateXML('<?xml............................ ,
  still doesn't work
I think because content of the file, on simple xml it works perfectly
probably there is need for  something else for svg be inserted into xmltype column
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
Just checking you did use the last one I posted?  What error were you getting from Oracle?  Which encoding is the database and SQLPlus session set up for?
0
 

Author Comment

by:AnnaBZ
Comment Utility
The same error:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00256: invalid element

this is the encoding encoding AL32UTF8
0
 

Author Comment

by:AnnaBZ
Comment Utility
Thanks every body
I found the problem , it was in svg file itself :
if I remove this from the file:
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
it works ,it just doesn't know this character  "]>"
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
Comment Utility
 Glad you solved it. This is what I suggested:

> THis actually indicates a failure in parsing. Can you make sure your XML is well formed and valid?

  so if you are happy can you please accept the answer?
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
Wow, when I included those parts on my database it worked fine!  Strange...

It complained about unrecognised characters, but I don't have a the same character set set up, so removing just them (part of one of your metadata tags, and a couple of errors elsewhere)

Glad you sorted it though!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This video teaches viewers about errors in exception handling.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now