Ignoring entity references

Does anyone know how to get the xmlparser wto ignore(pass through without decoding) character entity references?
I'm using XML as a mechanism to move inserts, updates, and deletes from non-oracle databases into Oracle. The
XML is put in an A.Q. and then parsed on the Oracle side into sql statements.
We have entity references like ° that we would like the parser to leave alone. We could then insert the reference
into the database and Web browsers would decode it at retrieval time. Note - we are not using the 9i XML datatype to
store this data - it is parsed into varchar columns. Currently the parse knows only about the 4 or 5 standard references.
When it sees one that is not in the DTD it pukes.

Entity reference means that you use some encoding that does not have
e.g. character � then you must declare entity references in dtd like:
<!ENTITY uacute     "�"> <!-- LATIN SMALL LETTER U WITH ACUTE -->
and in xml:
<myTextElement>Per&uacute;</myTextElement>.
but if you have the character in xml like this
<myTextElement>Per�</myTextElement>
then you must add encoding to <?xml version="1.0" encoding="some-enc-that-has-eacute">accordingly.
Anyway, to get rid of these kind of problems you should stick to utf-8 :-)
BTW. Did I answer the right question?
Kullervo

Similar Messages

  • Entity Reference difficulties

    I'm trying to generate an XML so that it shows the Entity References. I need help figuring what I'm doing wrong. Complete source is included below.
    When I run the included source, I get:
    <?xml version="1.0"encoding="UTF-8"?>
    <xmlTest>
    <polish text1="�"/>
    </xmlTest>But what I really want is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xmlTest>
    <polish text1="& # 0 2 2 5 ;"/>
    <note value="Note that the forum is too smart for my special formatting. Please disregard the spaces in between each character in the previous element. This current element is just a note is is also to be ignored."/>
    </xmlTest>Source:
    import java.io.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    * @author pclement
    public class XmlTransformerEntityIssue {
        /** Creates a new instance of XmlTransformerEntityIssue */
        public XmlTransformerEntityIssue() {
        public static void main(String a[]) throws Exception {
            XmlTransformerEntityIssue test = new
    XmlTransformerEntityIssue();
            test.execute();
        public void execute() throws Exception {
            Document doc = generateTempDoc();
            StringBuffer text = transform(doc);
            doc = null;
            System.out.println(text);
            File file = File.createTempFile("xkgjfhfhf", ".xml",
    new File("c:/temp/"));
            FileWriter w = new FileWriter(file);
            w.write(text.toString());
            w.flush();
            w.close();
            file = null;
        private Document generateTempDoc() throws Exception {
            DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
            factory.setValidating(false);
            DocumentBuilder docBuilder =
    factory.newDocumentBuilder();
            Document doc = docBuilder.newDocument();
            Element xmlTest  =
    (Element)doc.createElement("xmlTest");
            // try polish
            Element node = (Element)doc.createElement("polish");
            node.setAttribute("text1", "\u00E1");
            // append element
            xmlTest.appendChild(node);
            node = null;
            doc.appendChild(xmlTest);
            return doc;
        private StringBuffer transform(Document doc) throws
    Exception {
            TransformerFactory tFactory =
    TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer();
            DOMSource source = new DOMSource(doc);
            StringWriter writer = new StringWriter();
            StreamResult result = new StreamResult(writer);
            transformer.transform(source, result);
            doc = null;
            return writer.getBuffer();
    }

    Turns out, that the character '�' CANNOT be
    e represented raw in UTF8. As UTF8 uses the first
    128 chars for English, it uses the rest for special
    formatting. It is quite well documented.I don't know what you mean by "raw" here. Your characterization of UTF-8 is wrong, although Microsoft's description is correct. It is possible to represent &aacute; in UTF-8, it just takes two bytes. I suppose you might call this "special formattting" but I certainly don't. That's just how UTF-8 represents characters.
    http://msdn.microsoft.com/library/default.asp?url=/lib
    rary/en-us/dnxml/html/xmlencodings.aspYou might want to read this article too:
    http://skew.org/xml/tutorial/
    I feel it describes things better for Java users.
    After having read MS's site, I then went to
    O'Reilly's Java Internationalization book. On pages
    166 and 167 is where the following block of code came
    from:
    byte bytes[] = text.getBytes("UTF8");
    return new String(bytes);
    I don't have the book. Perhaps there's a context where that code is meaningful. There are certainly plenty of contexts where it is not.
    I realize that it's a lot easier to read and comment
    than to do a POC (proof of concept). But I'm not
    sure why you say that the original XML is fine!Looks like I was wrong about that. Apparently you were not generating the original XML correctly. Still, you shouldn't have to resort to hacks like that to get non-ASCII characters into XML. It looks like you read it from a UTF-8 encoded file, incorrectly using your system's default encoding. In that case the O'Reilly hack would reverse that error. At least it would for that particular character. If it had been a Chinese character it probably wouldn't have worked.
    The new code runs quite well and comes from O'Reilly
    - a source I trust.It's hard to argue with working software.

  • Problem in parsing-invalid use of a parameter entity reference

    Hi
    I am getting an error in parsing the xml message. The first few lines of DTD are as follows.
    <!ENTITY % contractIdentifier "contractRef , branch">
    <!ENTITY % ccyDetails "amount , settlementDate , dealRate">
    <!ENTITY % schedule "count , schedule">
    <!ENTITY % paymentDetails "payIndicator , ourPayAccount , theirAgent ,
    theirAgentsAgent , beneficiaryAccount , receiveIndicator , ourReceiveAccount
    , suppressCable , suppressConfirmation , pvpIndicator">
    <!ENTITY % commonCore "%paymentDetails; , narrative* , abaNumber ,
    cleanRiskIndicator , creditLine , directSent , federalFundsFlag , chipsCode
    , riskTakingUnit">
    I am getting the error as
    invalid use of a parameter entity reference line no 5.
    Can somebody help me
    Thanks
    Prashant

    Parameter entity references may not be used within markup in an internal DTD.
    To use a DTD with parameter entity reference use a external DTD.

  • Entity Reference embedded within colspec attribute name-table col. heading

    My team is working on a project that involves converting MS Word documents to XML. The XML is applied to a stylesheet (*.xsl) which generates a *.pdf document. Is it valid to include an xml entity reference within a colspec attribute name? For example, the xml document would contain the following code for a table:
    <t id="t1109681052">TABLE 1.0 My Favorite Restaurants</t>
    <tbl id="tbl921133606" val="1.0">
    <TblHdg num="1">Table 1.0 My Favorite Restaurants </TblHdg>
    <colspec id="colspec1148420628" name=" Restaurant Name" width="0.61875"/>
    <colspec id="colspec201089067" name="Type of Authentic Cuisine" width="1.61875"/>
    <colspec id="colspec201089069" name="Location" width="1.61875"/>
    </tbl>
    Is the following code valid in XML to produce the results in the sample table below when the XML is applied to a stylesheet (xsl)?
    <colspec id="colspec201089067" name="Type of "Authentic" Cuisine" width="1.61875"/>
    The desired table and column titles would be as follows:
    Restaurant Name ----     Type of “Authentic” Cuisine ----     Location
    Le Chantecler --------------->French     The Negresco Hotel –
    Promenade des Anglais Nice France
    La Coupola -------------------->French     The Mirabeau Hotel
    1 Princess Grace Ave
    Monte Carlo Monaco
    What is needed in the XML code to produce the table column heading with quotes embedded around the word "Authentic"?
    Please advise. Thanks so much and have a prosperous and memorable holiday.

    SOLUTION RESOLVED FOR THIS MESSAGE.

  • [SOLVED] ADF BC : View Object "second level" Entity reference issue

    hi
    If I insert a row in a View Object that uses "two levels" of Entity references, the attributes of the Entity on the "second level" don't get a value.
    Consider these tables:
    MY_ROW (MY_ROW_ID, MY_ROW_STUFF, MY_ROW_LU1_ID)
    MY_ROW_LU1 (MY_ROW_LU1_ID, MY_ROW_LU1_STUFF, MY_ROW_LU1_LU1_ID)
    MY_ROW_LU1_LU1 (MY_ROW_LU1_LU1_ID, MY_ROW_LU1_LU1_STUFF)
    Where MY_ROW.MY_ROW_LU1_ID is a "look-up" in MY_ROW_LU1 and MY_ROW_LU1.MY_ROW_LU1_LU1_ID is a "second level look-up" in MY_ROW_LU1_LU1.
    I created default Entities and Associations on these tables and a View Object that uses all 3 Entities (MyRow as Updatable, MyRowLu1 and MyRowLu1Lu1 as Reference).
    See example code in
    http://verveja.footsteps.be/~verveja/files/oracle/ViewObjectEntityReferenceIssue-v0.03.zip
    (contains no Java code, all out-of-the-box ADF BC)
    problem scenario:
    If run the MyRowService Application Module in the Oracle Business Component Browser and "open" the MyRowViewAll View Object instance, I get the rows and their related "look-up values".
    If I click the "Insert a new record" button and fill out values for MyRowId, MyRowStuf and MyRowLu1IdEntity, I only get "look-up" values for the "first level". While the "second level" stays empty.
    For example, a MyRowLu1IdEntity of "2003" gives a MyRowLu1Stuff value of "2003 stuff", but no value in MyRowLu1Lu1Stuff.
    What am I doing wrong? What should I change to also get a value in the "second level" MyRowLu1Lu1Stuff attribute?
    many thanks
    Jan Vervecken

    Jan,
    If you create a view object on Emp and Dept, with Dept as a reference entity, you might choose to build the view object to only include the:
    Emp.Empno (required, since it's the PK of Emp entity usage)
    Emp.Ename (included since you want to show the ename)
    Dept.Deptno (required, since it's the PK of the Dept entity usage)
    Dept.Dname (included since you want to show the dname)
    The wizard enforces the inclusion of the required attributes above.
    When you run this view object, a join is performed and you see the reference data.
    Now, if you want to allow the user to UPDATE the reference data, you need to add one more attribute to the list of attributes:
    Emp.Empno
    Emp.Ename
    Emp.Deptno (To allow user to change Deptno employee belongs to)Dept.Deptno
    Dept.Dname
    At this point, not only is the join performed for you, but the ADF BC reference mechanism reacts to any modification of the Emp.Deptno attribute, correctly showing the reference information for that new foreign-key-referenced department (even before commiting and requerying, at which time the SQL join would pickup that correct, related information).
    The "second level" problem you describe in this thread is simply the same issue described here as a master/first-level-detail situation, taken to its logical next step. If you want the end-user to be able to change the second-level detail to which the first-level-detail is associated, you need to include the first-level-detail's foreign key attributes in the view object's select list. Otherwise, there is no foreign key attribute whose value-change event the framework can react to in order to coordinate the related reference data in the row.
    I've blogged a link to a working example of a four-level reference information view object here:
    http://radio.weblogs.com/0118231/2007/05/09.html#a818
    based on the HR schema.

  • Non-Latin is converted into entity reference in "Copy Text" of Extract

    The Japanese (other than Latin) text which I copied in a clipboard is converted into entity reference when I perform "copy text" in a letter layer using Extract for Brackets.
    Is this problem a known thing? This does not rise in Extract of Creative Clouds, Dream Weaver.
    An example:
    Oh, it is → &#12354;
    아 → &#50500;
    أ نا ← &#1571;&#1606;&#1575;

    Hi Bernard,
    This is really a 'browser issue' (which is probably not what you wanted to hear). Since it's up to the browser how it handles copy/paste.

  • Make DocumentBuilder.parse ignore DTD references

    Thanks to everyone in advance -
    So this issue looks to be pretty popular, I have found a few solutions, but nothing seems to stop the downloading of dtd files, for instance ones sitting up on w3.org.
    Here are some of the solutions i have found:
    http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
    http://forums.sun.com/thread.jspa?threadID=284209&forumID=34
    When I use this solution:
    myDocumentBuilder.setEntityResolver(new EntityResolver() {
              public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
                     throws SAXException, java.io.IOException
                if (publicId.equals("--myDTDpublicID--"))
                  // this deactivates the open office DTD
                  return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
                else return null;
    });it still continues to download the dtd.
    Any suggestions?
    Thanks,
    Sam

                        MyDocumentBuilder.setEntityResolver(
                             new EntityResolver() {
                                  public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException {
                                       if(true){
                                            throw new IOException(publicId +"|"+ systemId);
                                       return null ;
                        );Good eye - It looks like that IOException is never being called - any suggestions?
    Thanks,
    Sam

  • "Error in processing external entity reference" - why?

    -- FM 8.0p277, structured --
    Saddened to see this morning that FM apparently decided against saving the work I did yesterday afternoon ... I can sympathise with the idea of not saving imperfect documents, but it could at least have warned me!
    First attempt at saving this morning throws up the following message.
    ] XML Parser Messages (Document Prolog)
    ] Error at file P:\ACM\smu\ditabase.dtd, line 71, char 17, Message: Could not open external entity 'P:\ACM\smu\indexingDomain.ent'
    ] Parse error at line 71, char 0: Error in processing external entity reference
    * I certainly haven't created any .dtd, so where might this defective file have come from?
    * ditto for defining entities
    So - what's the root problem, and how do I set about correcting it?
    [ps] I get exactly the same message when I use the FM DITA menu to create a brand-new topic.

    Hey Niels...
    That *shouldn't* be happening if you're using an unmodified FM8 install .. especially with creating a new file. It sounds like something has gone awry in your install. This will often happen if the doctype declaration in the XML file is defined as a system resource rather than with a public ID (but that shouldn't be happening unless you're creating the file with another editor or using a file created by someone else).
    Some things to check ..
    - Open the DITA > Options dialog .. is "DITA-Topic-FM" selected as the "Topic application"?
    - When you open a file from disk, do you select "DITA-Topic-FM" as the structure application? (You may not get an option to do so .. that's OK.)
    - Choose .. Structure Tools > Edit Application Definitions .. locate the XMLApplication node that is labeled "DITA-Topic-FM" .. below that you'll see entries for Template, DTD, and Read/write rules. Check that the files specifed actually exist at the locations specified (note that "$STRUCTDIR" maps to the FrameMaker/Structure/ folder).
    - Have you installed FrameMaker in a "nonstandard" location?
    I may be missing something obvious, but this is probably a good start.
    Cheers,
    ...scott

  • XML Error - Illegal character or entity reference syntax

    Illegal character or entity reference syntax.
    Illegal character or entity reference syntax.
    The error occurred in D:\Docwf\dashboard\dsp_TestXML.cfm:
    line 80
    Called from D:\Docwf\dashboard\fbx_Switch.cfm: line 357
    Called from D:\Docwf\dashboard\fbx_Switch.cfm: line 1
    Called from D:\Docwf\fbx_fusebox30_CF50.cfm: line 241
    Called from D:\Docwf\fbx_fusebox30_CF50.cfm: line 1
    Called from D:\Docwf\fbx_fusebox30_CF50.cfm: line 1
    Called from D:\Docwf\index.cfm: line 37
    78 :
    <ProjectNo>#nqOffTimeExp.prProjNo#</ProjectNo>
    79 :
    80 : </cfloop>
    81 : </AccountPayable>
    82 :
    This is the error page and my code is attached below. As you
    can see in the code there are two instances where I am creating XML
    files. In the first case I am not getting any error but in the
    second case I get the error . Any ideas ???
    Thanks.
    CODE:

    Change this:
    <Description>#nqOffTimeExp.iddescript#</Description>
    <FirstName>#nqOffTimeExp.eoFirst#</FirstName>
    <LastName>#nqOffTimeExp.eoLast#</LastName>
    <ChargeDate>#nqOffTimeExp.idchargesdt#</ChargeDate>
    <BillCode>#nqOffTimeExp.idbillcode#</BillCode>
    <ProjectNo>#nqOffTimeExp.prProjNo#</ProjectNo>
    To this:
    <Description>#
    XmlFormat (nqOffTimeExp.iddescript)#</Description>
    <FirstName>#
    XmlFormat (nqOffTimeExp.eoFirst)#</FirstName>
    <LastName>#
    XmlFormat (nqOffTimeExp.eoLast)#</LastName>
    <ChargeDate>#
    XmlFormat (nqOffTimeExp.idchargesdt)#</ChargeDate>
    <BillCode>#
    XmlFormat (nqOffTimeExp.idbillcode)#</BillCode>
    <ProjectNo>#
    XmlFormat (nqOffTimeExp.prProjNo)#</ProjectNo>

  • Howto force Oracle XML parser not to expand entity references?

    Hi,
    Is it possible to force Oracle XML parser (Java) not to expand entity references, so that they appear in DOM tree as separated nodes after parsing XML?
    Example:
    for following XML
    <tag>abc&auml;xyz</tag>
    I get:
    Element: "tag"
    |-Text: "abcdxyz"
    but I would like to get:
    Element: "tag"
    |-Text: "abc"
    |
    |-EntityReference: "auml"
    |
    |-Text: "xyz"
    I've already tried to use JAXP api (setExpandEntityReferences method in java.xml.parsers.DocumentBuilderFactory), but it doesn't seem to work.
    I'm using parser from XDK Java v9.2.0.2.0 Production.
    Thx,
    James

    This is requested code sample:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setExpandEntityReferences(false);
    System.out.println("isExpandEntityReferences = "+dbf.isExpandEntityReferences());
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document d = db.parse("file://c:/test.xml");
    Element e = d.getDocumentElement();
    System.out.println("documentElement"+ e.getTagName() + " nodeType=" +e.getNodeType());
    System.out.println("ChildNodes:");
    NodeList nodeList = e.getChildNodes();
    for(int i=0; i<nodeList.getLength();i++) {
    System.out.println(i+" value=\""+nodeList.item(i).getNodeValue()+"\" nodeType="+nodeList.item(i).getNodeType());
    Content of test.xml:
    <!DOCTYPE test SYSTEM "test.dtd">
    <test>abc&auml;xyz</test>
    Content of test.dtd:
    <!ELEMENT test (#PCDATA)>
    <!ENTITY auml "&#x00E4;">
    When you run it you will get the following output:
    isExpandEntityReferences = true
    documentElementtest nodeType=1
    ChildNodes:
    0 value="abcdxyz" nodeType=3
    which means that EntityReference has been expanded.
    As you can see in the output the isExpandEntityReferences method returns "true", even though I set it to false in code!
    Does it mean that Oracle parser simple doesn't support this feature???
    Thx,
    James

  • HTML Character entity references on SQLQuery

    I am trying retrieve the data thru XMLElement and I like to do a HTML Character entity references. I guess XMLElement does it with the proper character set translations and I was not successul in getting it correct. Could you please help me out. My DB character set it UTF-8.
    For example, the "acute" e needs to be translated to its hexa equivalent. I tried it by setting the mid-tier's client's NLS but with no success. I dont want to scan the each character and convert it.
    create table master.temp_xml_encode
    (party_name_id NUMBER(15),
    party_id NUMBER(15),
    party_name VARCHAR2(200) );
    PARTY_NAME_ID PARTY_ID PARTY_NAME
    3831587 5496840 The West Company México, S.A. de C.V.
    3844362 5496730 Schiønning & Arvé A/S
    3847940 5496836 West Rubber de España, S.A.
    4047634 5983166 Timberland España, S.L.
    4266163 5983166 Timberland España, S.A.
    4285954 6482794 The Young Women¿s Christian Association of Central New Jersey
    SELECT XMLELEMENT("party_id", party_id,
    xmlforest(party_name_id AS "partynameid",
    party_name AS "partyname"
    FROM master.temp_xml_encode
    Thanks for your help

    And Yes forgot to add one thing, the index.jsp is a part of the application supplied by vendor and I do not have src of the struts actions (no control on server side code).
    I need to find a solution from client's side.

  • SAX Entity References

    Hi,
    I am currently trying to fix create software using SAX. I am parsing XML files and allowing them to be searched and modified and also offering the option to write them back to a file. However, in the input files there are entity references such as & - I know the parsers job is to remove them and replace them with the correct character - then when the file is written the entity references aren't included, the actual character is, making the XML file invalid.
    Is there a way to stop SAX replacing the entity references? I can't see a parser feature that allows this or is the only way to solve this problem to replace the characters with the entity references before writing them to file?
    Any help would be much appreciated.
    Thanks,
    Martin

    MartinSurf wrote:
    Hi,
    I am currently trying to fix create software using SAX. I am parsing XML files and allowing them to be searched and modified and also offering the option to write them back to a file. However, in the input files there are entity references such as & - I know the parsers job is to remove them and replace them with the correct character - then when the file is written the entity references aren't included, the actual character is, making the XML file invalid.If this is happening (the part about producing invalid XML files as output) for the built-in character entities like &amp; then it's your outputting code which is the problem.

  • Xslt output options for predefined entity references

    Are there plans to include options for controlling the output of XSLProcessor for predefined entity references?
    I haven't read the XSL spec by W3C, but I suppose that when <xsl:output method="html"> or method="text" is set all the XML predef. entity references (&;, &apos;, etc.) have to be output as charachters, not as &apos, &#39, etc.
    How is <xsl:output> going to be treated in the incoming version(s) with respect to entity references?
    In any case may be it is better to include a programatic way of controlling the output?

    I have a similar problem with the ampersand ent. ref. In the xsl file it has to be writen as and entity ref., but in the html output it must appear as character. However in the html file I'm also getting an entity reference.
    By the way, are you using xsl transformations for the bulletin board? In the previous post the software translated the ampersand ent. ref. into character, but not so the apostrophe.
    And generally can you tell me, how can I prevent the bb software from translating entity references :?)

  • Handling of entity reference - & - HELP!!!!

    Hi,
    I am using Java Class Generator to create a XML Document.
    I get data from 10 different table applying all the business rules and pass the value to the class generator.
    Everything is fine till I get "&" in my DB data. I have replaced "&" with &; before passing them as value.
    I get following error.
    Illegal character '&' in CharData
    Please help.
    Thanks,
    Sanjay.

    Your problem is XML related, not Oracle-XML. You should return to 'start' and buy a book on XML. Hint: & is used for entity references.
    see http://www.oasis-open.org/cover/xml.html
    or http://www.w3c.org/xml/
    null

  • The entity name must immediately follow the '&' in the entity reference.

    Hello Group,
    I have been receiving below such org.xml.sax.SAXParseException exceptions.
    Could you anyone please advise me what could be the reason for these issues and any probable solution thereby.
    NOTE:
    Eg1: Below string is causing error:
    USER Given: funnicity is funny. isn't it. true. well go to "funnicity" today.
    Escaped String : funnicity is funny. isn&#039;t it. true. well go to "funnicity" today.
    Eg2: Below string successfully generated spell suggestions:
    USER Given: funnicity is funny. isn ' t it. true. well go to " funnicity " today.
    Escaped String : funnicity is funny. isn &#039; t it. true. well go to " funnicity " today.
    The difference between above two example strings is, characters to be escaped were separated from other chars with a single whitespace.
    In the below notes "TEXT:" is the string sent by ERXGoogleSpell to org.w3c.dom.Document.parse(InputStream) method and "ERROR:" is the error received from ERXGoogleSpell:
    TEXT:
    funnicity is funny. isn't it. true. well go to " funnicity " today.
    ERROR:
    The entity name must immediately follow the '&' in the entity reference.
    00:43 DEBUG text is : funnicity is funny. isn t it. true. well go to "funnicity" today.
    [Fatal Error] :1:244: The reference to entity "quot" must end with the ';' delimiter.
    er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. isn t it. true. well go to "funnicity" today.'.
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
    at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
    at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
    at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
    at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
    at com.mtj.Application.dispatchRequest(Application.java:669)
    at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
    at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: org.xml.sax.SAXParseException: The reference to entity "quot" must end with the ';' delimiter.
    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
    ... 14 more
    TEXT:
    funnicity is funny. tell me isn't it true.
    ERROR:
    07:29 DEBUG text is : funnicity is funny. tell me isn't it true.
    [Fatal Error] :1:187: The entity name must immediately follow the '&' in the entity reference.
    er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. tell me isn't it true.'.
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
    at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
    at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
    at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
    at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
    at com.mtj.Application.dispatchRequest(Application.java:669)
    at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
    at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
    at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
    at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
    ... 15 more
    Please let me know, if this email is not clear or need any information.
    Thanks in advance.
    Thank You,
    Shravan

    Thanks so much for all your responses.
    I have actually passed-in properly escaped text to document parser, but it is behaving vaguely.
    I see the text I have posted in my initial post is parsed by forum.
    Here is the text that is reported as error:
    Actual Text: Hello "World"
    Escaped Text passed to parser: Hello & quot;World& quot; (note: & and quot are indeed not separated)
    Here is the text that is working fine:
    Actual Text: Hello " World "
    Escaped Text passed to parser: Hello & quot; World & quot; (note: & and quot are indeed not separated)
    The difference in above two versions of text input is: quotes and word are separated by a space to work fine.
    Please advise a solution.

Maybe you are looking for