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.

Similar Messages

  • Displaying HTML character entities in JEditorPane

    Hi,
    I have noticed that when displaying HTML character entity references in a JEditorPane it will show some of them, e.g. © for copyright symbol but not others e.g. ’ for "curly" single quote.
    Is there any way to get JEditorPane to show all (most?) of them?

    Create a class that extends ComboBox and override the
    updateDisplayList and measureText functions. Then use that new
    ComboBox in your code:
    <local:HtmlComboBox .. xmlns:local="components.*".>
    <local:itemRenderer>
    <mx:Component>
    <mx:Text htmlText="{data.label}" />
    </mx:Component>
    </local:itemRenderer>
    </local:HtmlComboBox>
    Put this into a folder called "components" and name the file
    HtmlComboBox.as
    package components
    import mx.controls.ComboBox;
    import flash.text.TextLineMetrics;
    public class HtmlComboBox extends ComboBox
    public function HtmlComboBox()
    super();
    override protected function
    updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    super.updateDisplayList(unscaledWidth,unscaledHeight);
    var s:String = textInput.text;
    textInput.htmlText = s;
    override public function
    measureText(text:String):TextLineMetrics
    return measureHTMLText(text);
    }

  • 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 &deg; 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

  • 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>

  • 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.

  • Rendering text that contains old-style HTML character entities, e.g. ü

    The large text-corpus I'm working with was produced before the days of widespread Unicode support, and it contains HTML character entities instead of unicode codepoints, e.g. &uuml; for ü [u-umlaut].
    I can iterate through every text column in the ArrayCollections that I'm using for dataProviders to the DataGrid, and replace these entities with their unicode counterparts before the provider is assigned to the grid. But is there already a mechanism in place in Flex to render character entities in the DataGrid? Is there a ready-made ItemRenderer that can do this?
    Thanks

    DrClap wrote:
    So your example looks like this?
    <someNode>der fuchs springt &#252;ber den stein</someNode>
    now I feel stupid :-) Yes, that's correct.
    And you're actually getting an EntityReference node in your Document? I find that rather strange, since the documentation for EntityReference says
    Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference.
    Exactly!
    Because what you have there is a character reference. Is there something else in the document, a DTD for example, which might be interfering with that?No, just an ordinary XML header:
    <?xml version="1.0" encoding="UTF-8"?> ...If it helps, I can also post the complete document I am receiving.

  • 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

  • [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.

  • Html numeric entity to unicode

    The html numeric entity "&#163" (the Pound sign) is equivalent to \u00A3.
    Given "&#163", how do I get its unicode?
    Thanks

    If I remove this invalid xml character before doing xml parsing, it could avoid the exception.
    How do I make my program treats "& # 3 ;" (again please remove the space) as a single character(or unicode).The problem is that XML does not permit most of the ASCII non-printing characters -- Unicode code points 0 .. 31, so the parser is correctly rejecting it. Unfortunately, there are a lot of XML output tools -- including the one in the Sun JDK -- that simply escape these characters.
    The solution is that you're going to have to pre-process the input, search for all occurrences of the invalid character, and remove it before the XML parser touches the file.

  • 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.

  • Escaping standard XML entity references

    I've been trying to find a way to escape the greater than sign as well as other chars in my xsl stylesheet. I've tried several tips from the postings, but none seem to work. What I need is for my xml to the characters escaped in the same way as the &amp; & ampersand and &lt; < less than chars are. I run into problems when I try to get the ampersand in next to other characters without a separating ;
    Thanks in advance.

    Vassago (guest) wrote:
    : 1) The XML-parser for Java does not expand entity references,
    : such as &[whatever], instead all values are null. How to fix
    : this? Code example would be greatly appreciated.
    : 2) It seems you cannot have international character (such as
    : swedish characters, w) as values for internal entities, i.e.
    : <!ENTITY Ouml "Y">
    : How to solve this problem?
    1) You probably have a simple error defining/using your entities
    since we've a number of regression tests that handle entity
    references fine. A simple example is:
    <?xml version="1.0"?>
    <!DOCTYPE po [
    <!ENTITY status "beta">
    ]>
    <po foo="bar">
    <comment> Alpha, then &status </comment>
    </po>
    2) What do you set your character set encoding to be?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • 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.

  • 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.

Maybe you are looking for

  • Create tablespace in Oracle 10g Express

    Hi, I've been playing around over the last few days with Oracle 10g Express and I need to create my own tablespace and therefore create user associated with my custom table space. I tried with the command create tablespace, but I am not successful wi

  • Attach a file to a Purchse Order.

    Hi gurus, i´m trying to replicate the standard process for attaching a file to a purchase order. Is there Someone who knows how to do this? or the way it´s done by the standard. Or may be the the way to track the log of all those objects that the sta

  • Assigning 'Print' styles to existing CSS page

    Hello, Have designed basic site using CSS setting for 'all' media. Now I want to make CSS 'print' pages. The problem I'm having is assigning 'print' settings to my CSS page. Currently my head data reads: <head> <meta http-equiv="Content-Type" content

  • Not able to set display to 64bit after installing windows 7 Ultimate

    Hi all, I have purchased Lenovo G570, i5, 4 GB, 750 GB, it came with Windows 7 Home Premium -64bit Preloaded. Just couple of days earlier I had to Install Windows 7 Ultimate, since then I noticed a reduction in Screen resoulution, as far as my knowle

  • Online Number not ringing (And not able to reset p...

    I got reports from several persons who called my online number that it is not ringing, it goes direct to Voice Mail, i checked the requirements to have it working, Have the latest version of Skype (DONE), Be online in the computer (DONE), and if stil