Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Error Processing Resource

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I am using oracle 8.1.7 database on windows2000 advanced server and XSU
package.
When i generate an xml file from the database tables, i get an error
message on the internet explorer:
"A name contained an invalid character. Error Processing Resource".
The problem is that some of the tags are cut into two and the second goes
to a new line when the xml file is generated. If i open the file in
notepad and readjust the tags to become one on the same line then the xml
file is loaded correctly...
This is the output of the generated XML on IE6.0.
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
---------------------------------------------------------------------------
Whitespace is not allowed at this location. Error processing resource
'file:///Z:/ora81/bin/EMPS.xml'. Line 36, Position 8

<

when I open the file in Notepad to view the source i get this See fragments
in records 4 & 8)
<?xml version = '1.0'?>
<EMPS>
<mappings Record="1">
<EMPNO>1000</EMPNO>
<ENAME>KING</ENAME>
<JOB>salesman</JOB>
<MGR>1001</MGR>
<SAL>2001</SAL>
<DEPTNO>10</DEPTNO>
<DOUBLE_SAL>3500</DOUBLE_SAL>
<PICTURE>333.tif</PICTURE>
</mappings>
<mappings Record="2">
<EMPNO>1001</EMPNO>
<ENAME>CHARBEL</ENAME>
<JOB>manager</JOB>
<SAL>5000</SAL>
<DEPTNO>10</DEPTNO>
<DOUBLE_SAL>7000</DOUBLE_SAL>
<PICTURE>ccc.jpg</PICTURE>
</mappings>
<mappings Record="3">
<EMPNO>1002</EMPNO>
<ENAME>GEORGES</ENAME>
<JOB>salesman</JOB>
<MGR>1001</MGR>
<SAL>2500</SAL>
<DEPTNO>11</DEPTNO>
<DOUBLE_SAL>4000</DOUBLE_SAL>
<PICTURE>image8.tif</PICTURE>
</mappings>
<mappings Record="4">
<EMPNO>1003</EMPNO>
<ENAME>MICHEL</ENAME>
<JOB>manager</JOB>
<
SAL>3500</SAL>
<DEPTNO>12</DEPTNO>
<DOUBLE_SAL>5000</DOUBLE_SAL>
<PICTURE>111.TIF</PICTURE>
</mappings>
<mappings Record="5">
<EMPNO>1004</EMPNO>
<ENAME>JEAN</ENAME>
<JOB>security</JOB>
<MGR>1003</MGR>
<SAL>1750</SAL>
<DEPTNO>13</DEPTNO>
<DOUBLE_SAL>4000</DOUBLE_SAL>
<PICTURE>bmw.jpg</PICTURE>
</mappings>
<mappings Record="6">
<EMPNO>1005</EMPNO>
<ENAME>RUDI</ENAME>
<JOB>secretary</JOB>
<MGR>1003</MGR>
<SAL>2750</SAL>
<DEPTNO>13</DEPTNO>
<DOUBLE_SAL>4000</DOUBLE_SAL>
<PICTURE>image3.tif</PICTURE>
</mappings>
<mappings Record="7">
<EMPNO>1020</EMPNO>
<ENAME>GERARD</ENAME>
<JOB>salesman</JOB>
<SAL>3200</SAL>
<DEPTNO>10</DEPTNO>
<PICTURE>image2.tif</PICTURE>
</mappings>
<mappings Reco
rd="8">
<EMPNO>2343</EMPNO>
<ENAME>enhyg</ENAME>
<SAL>1111</SAL>
<DEPTNO>13</DEPTNO>
<PICTURE>image1.tif</PICTURE>
</mappings>
<mappings Record="9">
<EMPNO>1022</EMPNO>
<ENAME>zico</ENAME>
<JOB>salesman</JOB>
<MGR>1000</MGR>
<HIREDATE>1/21/2001 0:0:0</HIREDATE>
<SAL>3200</SAL>
<COMM>1223</COMM>
<DEPTNO>13</DEPTNO>
<PICTURE>no_image.tif</PICTURE>
</mappings>
<mappings Record="10">
<EMPNO>1009</EMPNO>
<ENAME>CHICH</ENAME>
<SAL>4500</SAL>
<DEPTNO>13</DEPTNO>
<PICTURE>image.tif</PICTURE>
</mappings>
<mappings Record="11">
<EMPNO>4532</EMPNO>
<ENAME>FEFFR</ENAME>
<JOB>RRR</JOB>
<MGR>43</MGR>
<SAL>3535</SAL>
<COMM>14</COMM>
<DEPTNO>14</DEPTNO>
</mappings>
</EMPS>
when i fix the fragments in records 4 and 8 and refresh the page the output
is displayed correctly...
Besides i am using XML SQL utility (XSU) to generate an XML document from
inside of the Oracle environment...
Does anyone know the solution?
Thanks for your help...
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the easiest way to do it is to put a filter, or something like that, on the outputstream.
I believe a trim (or a replace('\n',''), I believe) should do the trick very easy.
Indeed, this is not too good in terms performance, so u should look at that oracle tool of yours. JAD decompiler might be the best ideea, if that tool is not too big ???
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic