Solved

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

Posted on 2003-11-05
31
499 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 6
  • 6
  • +2
31 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 9685395
0
 
LVL 35

Expert Comment

by:girionis
ID: 9685405
> 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
ID: 9685410
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 35

Expert Comment

by:girionis
ID: 9685419
> LPX-00256: invalid element

  This probably indicates the problem.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9685520
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
ID: 9685565
 jimmack, be fast or be last :)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9685588
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
ID: 9685602
 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
ID: 9685622
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
ID: 9685715
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
ID: 9685741
> 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
ID: 9685781
> 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
ID: 9685783
> or "work" less hard, and EE more

  Heheh Tim, so true :)
0
 

Author Comment

by:AnnaBZ
ID: 9685853
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
ID: 9685870
 If the size of xmltype column is limited you might need to use a BLOB or CLOB type.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9685878
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
ID: 9685885
 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
ID: 9685944
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
ID: 9685963
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
ID: 9685975
 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
ID: 9685979
> 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
ID: 9686003
>> 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
ID: 9686032
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
ID: 9686090
 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
ID: 9687032
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
ID: 9687567
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
ID: 9687837
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
ID: 9687972
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
ID: 9692743
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
ID: 9692766
 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
ID: 9692903
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

726 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