473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

clarify problem

31
how to solve this problem Assignment.xml:3:20: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Assignment'. this is repeat for all tags
this is the xml document
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <SONG>
  3.   <TITLE>Assignment</TITLE>
  4.   <COMPOSER>Jacques Morali</COMPOSER>
  5.   <COMPOSER>Henri Belolo</COMPOSER>
  6.   <COMPOSER>Victor Willis</COMPOSER>
  7.   <PRODUCER>Jacques Morali</PRODUCER>
  8.   <!-- This is a comment. -->
  9.   <LENGTH>6:20</LENGTH>
  10.   <YEAR>1978</YEAR>
  11.   <ARTIST>Village People</ARTIST>
  12. </SONG>
  13. <!-- You can tell what album I was 
  14.      listening to when I wrote this example -->
May 29 '07 #1
8 4337
dmjpro
2,476 2GB
Welcome to TSDN.

how much did u proceed????

kind regrds.
dmjpro.
May 29 '07 #2
r035198x
13,262 8TB
how to solve this problem Assignment.xml:3:20: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Assignment'. this is repeat for all tags
this is the xml document
<?xml version="1.0" encoding="UTF-8" ?>
<SONG>
<TITLE>Assignment</TITLE>
<COMPOSER>Jacques Morali</COMPOSER>
<COMPOSER>Henri Belolo</COMPOSER>
<COMPOSER>Victor Willis</COMPOSER>
<PRODUCER>Jacques Morali</PRODUCER>
<!-- This is a comment. -->
<LENGTH>6:20</LENGTH>
<YEAR>1978</YEAR>
<ARTIST>Village People</ARTIST>
</SONG>
<!-- You can tell what album I was
listening to when I wrote this example -->
Moved to XML forum .
May 29 '07 #3
dorinbogdan
839 Expert 512MB
Please give more details about how did you get the error.
May 29 '07 #4
Has anyone resolved this? I had something similar. I am using Xerces in Websphere to parse a file full of application configuration info. The process has worked many times in the past. I resently moved my XML file into the package as a system resource, and that worked fine but then recently I suddenly get streams of

"[Error] :5:22: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'jdbc:db2:ABO'."

One for each node in the XML file. This occurs as I invoke

parser.parse(new InputSource(xmlFile));

on the DOMParser object. This began as I was reorganizing the project a bit, and changing classpaths and so forth, but I don't see how those changes should be impacting this behavior as it plainly finds BOTH the XML file AND the DOMParser. Still, I MUST have done something during that process, but have no idea what.

If you have a solution please email bmulholland@cassevern.com as i do not regularly read these forums.
Sep 4 '07 #5
jkmyoung
2,057 Expert 2GB
The element field is probably not cast to an xs:string.
Sep 4 '07 #6
The element field is probably not cast to an xs:string.
Can you elaborate on that? Do you mean I have to do something as I parse it in Java? Or is this something wrong with the XML source?

Note that I am not doing anything fancy with XSLT nor even using a schema. This is plain XML. More to the point the code did not change, nor did the XML source. I just fiddled with how I broke my project up.

I do have more info from yesterday...I noticed that the failure only occurs when I perform the parse from a piece of code I am deploying to the server's lib directory because it is a custom registry in WAS. Now, this same bit of code HAS worked in that environment before, but whatever I broke only affects this deployable, not the regular EAR.

I must have broken some classpath setting or something, but the messages I get are infuriatingly unhelpful AND I can tell from the debug that both the XML file AND Xerces are being successfully loaded before the problems occur.
Sep 5 '07 #7
jkmyoung
2,057 Expert 2GB
Normally these errors come from validating against a schema.

It could be that you are automatically drawing the schema file from somewhere.
Assuming you're using Java Xerces, you could try creating a new project and seeing if that works. Alternatively, you could try setting a different parser, but I'm assuming your code is based on the behaviour of that particular xml parser.
Sep 5 '07 #8
To help those in the future with this problem (I googled all over and found nothing) what happened to me is pretty simple and I feel a little silly with how simple it turned out to be.

While I was retooling I must have removed the import for DOMParser and used exclipse's prompting mechanism to reinclude it (I am guessing because I don't remember changing it at all). The problem is that it found two different DOMParsers and I must have accidentally chosen the wrong one. One was org.apache.xerces.parsers.DOMParser. The other was org.apache.xerces.impl.xs.dom.DOMParser. The former works fine, the latter gives the error I sited.
Sep 7 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: grahamo | last post by:
Hi, I have something that I'd like to clarify here.... there are two issues. I have simple dummy class called base which (everything is inlined just for readability) defines these methods... ...
7
by: hugo.elias | last post by:
Hi all, I hope nobody minds me posting this question to this group, but I couldn't find any group closer to the Subject. Can anyone clear up where you draw the lines when dividing up an...
2
by: bissatch | last post by:
Hi, I am one of the many that get fed up with browser sniffing and cross platform issues. Is ECMAscript a new independant cross platform specification that can do loads of nice things that...
11
by: Gopal Prabhakaran | last post by:
Dear Guys Equalant to OnError Resume Next in .net My problem is : if error is found, it must contiune from next line. Like OnError Resume Next in vb Thanx Gopal Prabhakaran
4
by: yop | last post by:
Lads Am using ASP.NET, Framework 1.1 Creating a web application to read details from a MYSQL database. Am using the dbProvider to create connection to the DB. I am having a lot of issues with...
9
by: javuchi | last post by:
I've been searching thru the library documentation, and this is the best code I can produce for this alogorithm: I'd like to return a dictionary which is a copy of 'another' dictionary whoes...
0
by: Jean-Marc Blaise | last post by:
Hi, The following page http://www-1.ibm.com/support/docview.wss?uid=swg1IY63894 states at top of page that FP8a fixes the problem, and at the bottom "First fixed in v8.2 fp9". Could you...
7
ilikesuresh
by: ilikesuresh | last post by:
Hi i have written this program to find the file information using stat structure. When i try to display the mode it shows blank(nothing) where is the problem lies here.. clarify me... ...
6
ilikesuresh
by: ilikesuresh | last post by:
Hi i write a program in Pro *C to increase the salary of employees based on some constraints. Its works fine and if i execute the program in the first time the salaries would be increased depending...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.