SAX Parser and special character problem

Hi,
Could anyone help with the following problem?
Background:
1. Using a SAX Parser (Oracle Implementation) to read XML from a CLOB, convert this XML to another format to be inserted in the database.
2. Due to performance issues we parse the input stream from the CLOB.
3. For same reason, we are not using XSL.
This is the problem we face:
1. Values of some of the tags in the XML have special characters (Ex: &, <, >).
2. While using the SAX Parser, the element handler function for the SAX Parser is called by the frame work with the value of these tags broken up with each of these characters being treated as a tag delimiter.
Ex: <Description>SomeText_A & SomeText_B</Description>
is treated as SomeText_A in first call to the handler; SomeText_B in the second call.
The handler function does not get to see the "&" character.
Thus, the final conversion is
Say, <Description> is to be converted to <FreeText>
we, get <FreeText>SomeText_A</FreeText>
<FreeText>SomeText_B</FreeText>
We tried using &; but it then breaks it up into SomeText_A, & and SomeText_B.
How can we get the whole value for the <Description> tag in the characters() function in the SAXParser so that we can convert it to <FreeText>SomeText_A & SomeText_B</FreeText>.
Thanks in advance..
Chirdeep.

We already tried that..looks like the line where I mentioned that it converted the entity referece characters to an ampersand..
"We tried using <entity reference for &> but it then breaks it up into SomeText_A, & and SomeText_B."
null

Similar Messages

  • & special character problem with parseXML() and parseEscapedXML().

    Hi,
    I'm having a problem to parse messages that has '&' character. According to metalink note 1340195.1 I tried to use parseXML instead of parseEscapedXML, still had same problem. Then added the following scope that replaces "&" with "& a m p ; a m p" (without spaces). Tried to use the java code as mentioned in the metalink note...
        <scope name="Replace_spec_char_scope">
          <faultHandlers>
            <catchAll>
              <sequence name="Error_Sequence_9_spec_char">
                <assign name="Assign_Error_Message_9">
                  <copy>
                    <from expression="ora:getInstanceId()"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:instanceId"/>
                  </copy>
                  <copy>
                    <from expression="string('XXOGL.B106.001')"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:errorCode"/>
                  </copy>
                  <copy>
                    <from expression="ora:getProcessId()"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:process"/>
                  </copy>
                  <copy>
                    <from expression="string('Receive_Kund')"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:activity"/>
                  </copy>
                  <copy>
                    <from expression="ora:getFaultAsString()"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:errorPayload"/>
                  </copy>
                  <copy>
                    <from expression="bpws:getVariableData('Receive_Kund_Dequeue_InputVariable','Message','/ns6:Message/Kund')"/>
                    <to variable="Error_Handler_Invoke_initiate_InputVariable"
                        part="payload"
                        query="/ns8:ErrorHandlerProcessRequest/ns8:inputPayload"/>
                  </copy>
                </assign>
                <bpelx:exec name="Log_Error_9" language="java" version="1.5">
                  <![CDATA[OGLLogger logger = new OGLLogger("B106.bpel");                    
    try{                      
        Element errorDetails= (Element)getVariableData("Error_Handler_Invoke_initiate_InputVariable","payload","/ns8:ErrorHandlerProcessRequest/ns8:errorPayload");             
        logger.error("XXOGL.B106.001","InstanceID: "+getInstanceId()+" Error details: "+errorDetails.getFirstChild().getNodeValue());            
    }catch(BPELFault e){            
        addAuditTrailEntry(e);            
        logger.fatal("Failed to log error details for message XXOGL.B106.001",e);      
    }]]>
                </bpelx:exec>
                <terminate name="Terminate_1"/>
              </sequence>
            </catchAll>
          </faultHandlers>
          <bpelx:exec name="Replace_spec_char" language="java" version="1.5">
            <![CDATA[java.lang.String temp = (String) getVariableData("Receive_Kund_Dequeue_InputVariable");
          OGLLogger logger = new OGLLogger("B106.bpel");
    try{
    temp = temp.replaceAll("&", "&amp;amp");
    setVariableData("Receive_Kund_Dequeue_InputVariable", temp);
    }catch(BPELFault e){             
        addAuditTrailEntry(e);             
        logger.fatal("Failed to replace special character ",e);       
    }]]>
          </bpelx:exec>
        </scope>Now getting this error.
    <scope name="Replace_spec_char_scope">
    Replace_spec_char(faulted)
    [2012/05/18 11:16:28] "{http://schemas.oracle.com/bpel/extension}runtimeFault" has been thrown. less
    -<runtimeFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>java.lang.ClassCastException
    </code>
    </part>
    -<part name="summary">
    <summary>com.collaxa.cube.engine.types.bpel.CXMessageVariable
    </summary>
    </part>
    -<part name="detail">
    <detail>
    java.lang.ClassCastException: com.collaxa.cube.engine.types.bpel.CXMessageVariable
         at bpel.xxogl_b106_kundinterface.ExecLetBxExe5.execute(ExecLetBxExe5.java:197)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:50)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:200)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:4174)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1680)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:238)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:335)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:6285)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1111)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:650)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:381)
         at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:705)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeDeliveryBean_LocalProxy_4bin6i8.handleInvoke(Unknown Source)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:148)
         at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:58)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)
    </detail>
    </part>
    </runtimeFault>
    <catchAll>
    <sequence>
    Assign_Error_Message_9
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    [2012/05/18 11:16:28] Updated variable "Error_Handler_Invoke_initiate_InputVariable" More...
    Log_Error_9
    [2012/05/18 11:16:28] bpelx:exec executed
    Terminate_1
    [2012/05/18 11:16:28] Instance terminated. Don't really understand what's wrong... Am I doing it incorrectly? Can anybody pls help!!
    Thanks in advance.
    Lisan

    Try to use parameters instead hardcoding values in the queries:
    select * from user where lower(username)=?;
    and don't forget to lower the value from java side as well ;-)

  • MII 12.0.4 - Problem MessageListener and special character (German) -

    Hey,
    we have the following Landscape:
    + ECC 6.0 with Unicode
    + MII 12.0.4
    Settings on the MessageListener Server:
    gwhost xxxxxxxxx 
    gwserv xxxxxxxxx 
    progid SAP_MII 
    trace   
    params   
    snc_myname   
    snc_qop   
    snc_lib   
    unicode 1 
    max_startup_delay
    Settings on the MessageListener Client:
    client yyy 
    user yyyyyyyy 
    alias_user   
    passwd   
    lang    de
    sysnr xx 
    ashost xxxxxxxx 
    mshost   
    gwhost xxxxxxxx 
    gwserv xxxxxxxxx 
    r3name   
    group   
    tpname SAP_MII 
    tphost   
    type   
    trace   
    codepage  
    abap_debug   
    use_sapgui   
    getsso2   
    mysapsso2   
    x509cert   
    lcheck   
    grt_data   
    use_guihost   
    use_guiserv   
    use_guiprogid   
    snc_mode   
    snc_partnername   
    snc_qop   
    snc_myname   
    snc_lib   
    dest   
    saplogon_id   
    extiddata   
    extidtype   
    idle_timeout   
    dsr
    Error-Description:
    When MII get a Message (RFC) from the ECC, all special character (German Umlaut) coming wrong.
    I tried with changing the Language, codepage... without any success. When I call the same Message
    (RFC) from the BLS through a JCO action block, then the result is with special character. I also tried
    this on a MII 12.0.5 installation without success... Did anybody had this problem one time?
    Kind Regards
    Pedro

    Pedro,
    we are working in an german environment with unicode, although I have set the Message Listener language to EN. I have found some material texts which came down with a MATMAS that contain german umlaute and which are shown correctly inside the database.
    I have also used a "normal" JCo block, no session. I guess it would make no difference using an IDoc or RFC.
    Have you seen the wrong characters, in the MII workbench or in a database where you store the contents?
    Michael

  • SAX parsing and loops problem

    Hi!
    I currently have an XML file which looks like this:
    <jel>
    <admin creation="Fri Nov 09 17:14:55 GMT 2007" xsdversion="1.0.0" version="1.0.0"/>
    &#8722;
         <jelclass superclass="Object" visibility="public" package="" superclassfulltype="java.lang.Object" fulltype="Player" type="Player">
    &#8722;
         <implements>
    <interface fulltype="java.awt.event.ActionListener" type="ActionListener"/>
    <interface fulltype="java.awt.event.KeyListener" type="KeyListener"/>
    </implements>
    &#8722;
         <methods>
    &#8722;
         <constructor visibility="public" name="Player">
    &#8722;
         <params>
    <param name="newProtocol" fulltype="NewProtocol" type="NewProtocol"/>
    <param name="x" fulltype="int" type="int"/>
    <param name="y" fulltype="int" type="int"/>
    </params>
    </constructor>
    &#8722;
         <method visibility="public" name="actionPerformed" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="e" fulltype="java.awt.event.ActionEvent" type="ActionEvent"/>
    </params>
    </method>
    &#8722;
         <method visibility="public" name="keyPressed" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="e" fulltype="java.awt.event.KeyEvent" type="KeyEvent"/>
    </params>
    </method>
    &#8722;
         <method visibility="public" name="keyReleased" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="e" fulltype="java.awt.event.KeyEvent" type="KeyEvent"/>
    </params>
    </method>
    &#8722;
         <method visibility="public" name="keyTyped" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="e" fulltype="java.awt.event.KeyEvent" type="KeyEvent"/>
    </params>
    </method>
    <method visibility="public" name="getX" fulltype="int" type="int"/>
    &#8722;
         <method visibility="public" name="setX" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="x" fulltype="int" type="int"/>
    </params>
    </method>
    <method visibility="public" name="getY" fulltype="int" type="int"/>
    &#8722;
         <method visibility="public" name="setY" fulltype="void" type="void">
    &#8722;
         <params>
    <param name="y" fulltype="int" type="int"/>
    </params>
    </method>
    </methods>
    </jelclass>And I have SAX parsing code that looks like this:
    public class SaxParser{
          private HashSet <String>packageSet = new HashSet<String>();
          private ArrayList <String> classList = new ArrayList<String>();
          private ArrayList <String> packageList = new ArrayList<String>();
          private ArrayList <String> methodList = new ArrayList<String>();
          private Object[] packageNames;
          private HashMap <String, ArrayList> h = new HashMap <String, ArrayList>();
          public SaxParser()throws Exception{
              String fname = "eclipse/jel.xml";
             DefaultHandler handler = new DefaultHandler()
                 private int numberOfClasses = 0;
             public void startElement(String namespaceURI,String localName, String qname, Attributes attrs)
                  if(qname.equals("jelclass")) {
                       numberOfClasses ++;
                  for(int i = 0; i< attrs.getLength();i++){
                        if(attrs.getQName(i).equals("type")){
                             classList.add(attrs.getValue(i));
                             if(attrs.getQName(i).equals("package")){
                                  packageList.add(attrs.getValue(i));
                                  packageSet.add(attrs.getValue(i));
                  for(int i = 0; i< attrs.getLength();i++){
                       for(int j = 0; j < classList.size(); j++){
              if(attrs.getQName(i).equals("type") && attrs.getValue(i).equals(classList.get(j))){
                  if(qname.equals("method")){
                        if(attrs.getQName(i).equals("name")){
                                    h.put(classList.get(i), methodList.add(attrs.getValue(i));
                   packageNames = new String[packageSet.size()];
                  packageNames = packageSet.toArray();
             public void endElement(String namespaceURI,String localName, String qname){}};
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse(new File(fname), handler);
         public int getPackageNumber(){
              return packageSet.size();
         public Object[] getPackageNames(){
              return packageNames;
         public ArrayList getPackageList(){
              return packageList;
         public ArrayList getClassList(){
              return classList;
         public ArrayList getMethodList(){
              return methodList;
          public static void main(String[] args)throws Exception{
               new SaxParser();
    }I am currently pulling out the package names, pulling out the classnames and then mapping these in a separate class - this works because the class and package names are declared in the same line, so if a package name appears in the package list 7 times, i know this package has 7 classes, and therefore i count the first 7 classes out of an array of all the classes and know that these are the right 7 for that package. However, the methods are a bit different:
    What I would like to do is to: for every class make a hashmap which maps the class name onto an arraylist of the methods, but i think i'm getting confused with my for loops. Or even just keep a tally of how many methods each class has, then I can work it out as i did with the packages -> classes.
    Does anyone know where im going wrong, or have any ideas at all?
    Thank you for your time,
    beccy
    :)

    I don't know if stacks are specifically mentioned in any SAX documentation.
    Basically, SAX sends you a stream of XML elements (open and close tags, characters, etc.), but it doesn't know anything about the underlying XML structure. You have to add that part (usually -- sometimes when writing a SAX application, you don't really care about the XML structure). XML structure is a tree.
    If you've ever written a recursive function that spans a tree, you'll have an idea what to do. You can use a stack to keep track of where you are in the tree. For example, if you open tag A, then you're "in" the A element for subsequent content in that document; if you then open tag B, you're in the B element; but when you close the B tag, you need the stack to tell you that now you're back in the A element.
    You may not need stacks, but it's likely. Find a good tutorial about SAX that mentions stacks and you'll be fine.
    Edited by: paulcw on Nov 14, 2007 4:09 PM

  • FileUpload and special characters problem

    Dear all,
    I currently encounter a issue with the FileUpload module.
    In my user form I have a FileUpload module to enable the user to upload a certificate file. The module itself is working fine but when the user controls an organisation containing a special character (like ñ), I cannot save the form because of the following error :
    ( ) - Warning: Parenthesized values in field 'accounts[Lighthouse].controlledOrganizations' do not match any of the allowed values.
    No controlled organisation is parenthesized.
    If I remove the FileUpload module, there is no error and I can save the user.
    If I change the type of the FileUpload module to Text, there is no error and I can save the user.
    I have two environments with this problem and two other without but the forms are identical, the java classes are the same. I do not see what would be able to cause this behaviour.
    Do you have any idea how to fix this ?
    It looks like the issue reported in this thread Problem using FileUpload Class Element/ encoding/ umlaut problem
    Thanks

    Try to use parameters instead hardcoding values in the queries:
    select * from user where lower(username)=?;
    and don't forget to lower the value from java side as well ;-)

  • SAX parser splits up character data; I expected Ign. whitesp

    Im am working on a XML parser for loading data from some back
    end systems into an Oracle 8i database. I am using the SAX
    parser for this purpose. After doing some tests with larger
    amounts of XML data (> 1M), I found some unexpected behaviour.
    The parser sometimes splits up character data into two chunks of
    data. The XML looks as follows:
    <TAGNAME> this is the character data </TAGNAME>
    The parser raises the following events:
    1 startElement name = "TAGNAME"
    2 characters chbuf = " "
    3 characters chbuf = "this is the character data "
    4 endElement name = "TAGNAME"
    I expected an ignorableWhitespace event at step 2. The XML
    document contains repetitive tagnames. The strange thing about
    the parse process is that the parser splits up the character
    data only sometimes, and I can't determine any kind of logica
    for this behaviour. Most occurrences of exactly the same tagname
    and character data are parsed correctly (that is, as I
    expected).
    Am I dealing with correct behaviour here, or is it a bug??
    Rolf.
    null

    Oracle XML Team wrote:
    : Rolf van Deursen (guest) wrote:
    : : Im am working on a XML parser for loading data from some
    back
    : : end systems into an Oracle 8i database. I am using the SAX
    : : parser for this purpose. After doing some tests with larger
    : : amounts of XML data (> 1M), I found some unexpected
    behaviour.
    : : The parser sometimes splits up character data into two
    chunks
    : of
    : : data. The XML looks as follows:
    : : <TAGNAME> this is the character data </TAGNAME>
    : : The parser raises the following events:
    : : 1 startElement name = "TAGNAME"
    : : 2 characters chbuf = " "
    : : 3 characters chbuf = "this is the character data "
    : : 4 endElement name = "TAGNAME"
    : : I expected an ignorableWhitespace event at step 2. The XML
    : : document contains repetitive tagnames. The strange thing
    about
    : : the parse process is that the parser splits up the character
    : : data only sometimes, and I can't determine any kind of
    logica
    : : for this behaviour. Most occurrences of exactly the same
    : tagname
    : : and character data are parsed correctly (that is, as I
    : : expected).
    : : Am I dealing with correct behaviour here, or is it a bug??
    : : Rolf.
    : The behavior is expected and correct. Could you elaborate on
    why
    : you would expect the parser to treat the whitespace signalled
    in
    : step 2 as ignorable?
    : Oracle XML Team
    : http://technet.oracle.com
    : Oracle Technology Network
    Thank you for your quick response.
    In my test XML, there are about 27500 tags containing character
    data. All character data starts with a whitespace character.
    After parsing the xml, the whitespace of only 5 (!) tags is
    treated as a seperate character event (so two character events
    are raised in succession). The remaining tags all raise only ONE
    character event for the entire character data. I can't explain
    the difference in treatment.
    null

  • REGEX AND SPECIAL CHARACTER

    Hi guys, I have a problem!!!!
    I am using the java.util.regex.*, when I try use the special character, for example ' \w ' I get a error
    Pattern.compile("\w123\w");
    The compiler return to me that the \w character is not a valide, the output error are:
    "illegal escape character".
    What I need do to put this character in my regular expression and don't get the error?!!?
    Another question, I use the feloow code
    Pattern p = Pattern.compile("isc");
    Matcher matcher = p.matcher("Giscard");
    if(matcher.matches())
       System.out.println("MATCH");
    else
      System.out.println("NOT MATCH");  //The resul is always this, why the regex don't match with my name?Thanks one more time.
    Giscard

    1)
    Pattern.compile("\\w123\\w");To input a single "\" in a Java program you must enter two "\\".
    2) read the javadoc
    matches()
    Attempts to match the entire region against the pattern.
    So "isc" only matches "isc", not "Giscard"
    You need to use find()

  • Xml publisher reprot - special character problem

    I invoice report through xml publisher. I have '&' special character in vendor list. I am getting below error
    A semi colon character was expected. Error processing resource.
    Below is the code
    CREATE OR REPLACE PACKAGE BODY XML_RPT AS
        FUNCTION XML_TAG (p_tag IN VARCHAR2, p_data IN VARCHAR2) RETURN VARCHAR2 IS
        l_ret_str VARCHAR2(5000);
        BEGIN
            l_ret_str := '<'||p_tag||'>'||p_data||'</'||p_tag||'>';
            RETURN l_ret_str;
        END XML_TAG;
         PROCEDURE VENDOR(errbuf          OUT  VARCHAR2,
                         retcode         OUT  NUMBER) IS
        CURSOR inv_Cur  IS
            select pv.vendor_name          
            from po_vendors pv;        
         xmldata            varchar2(1000);
         l_sqlstr           varchar2(1000);
         l_seqnum           varchar2(3);
         l_vendor_name      varchar2(100);
        BEGIN
          xmldata := '<?xml version="1.0" encoding="UTF-8"?>';     
          xmldata :=xmldata|| '<VENDOR>';
          xmldata := xmldata||' <LIST_VENDOR>';
          fnd_file.put_line(fnd_file.output,xmldata);    
          FOR rpt_rec IN inv_Cur LOOP
              xmldata := '<VENDOR_REC>';
              l_vendor_name := replace(rpt_rec.VENDOR_NAME,'&','&amp');         
              xmldata := xmldata || XXMCG_XML_TAG('VENDOR_NAME',L_VENDOR_NAME);
              xmldata :=xmldata|| '</VENDOR_REC>';
              fnd_file.put_line(fnd_file.output,xmldata);
          END LOOP;
          xmldata := '</LIST_VENDOR>';
          xmldata := xmldata||'</VENDOR>';
         fnd_file.put_line(fnd_file.output,xmldata);
        EXCEPTION
        WHEN OTHERS THEN
             fnd_file.put_line(fnd_file.log,substr(SQLERRM,1,500));
        END VENDOR;
    END XML_RPT;can any one advice.

    Duplicate post ? xml publisher report problem
    Srini

  • SAX-parser and mapping on the XI

    Helllo everybody,
    I'm trying to map an xml-document using the SAX-parser.
    I'm reading the data using an impustream. the problem is, while testing on the XI, the following message comes :
    Creating Java mapping xmlDataExchangeSAPSample/XMLValidation
    Loaded class xmlDataExchangeSAPSample.XMLValidation
    Loaded class xmlDataExchangeSAPSample.myErrorHandler
    Call method execute of the application Java mapping xmlDataExchangeSAPSample.XMLValidation
    START APPLICATION TRACE ***
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    END APPLICATION TRACE ***
    Java mapping xmlDataExchangeSAPSample/XMLValidation completed. (execute() of xmlDataExchangeSAPSample.XMLValidation
    Ausführung war erfolgreich.
    10:18:14 Testende
    the the Document ist generated :
    "...erstelltes Dokument aus in EDIFACTINTERCHANGE.."
    but the parser find an empty source.
    do you have an idea what could be happening here?
    Kind regards

    Hi,
      <<
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    >>
    This seems that u r trying parse a file rather than valid XML document..
    Usually you will notice this problem when u r trying to parse a payload which is in txt format usually when u r using File Adapter message protocol as "FILE" instead of "FCC".
    Usually SAX is an API Desinged to parse Valid XML Documents only.
    If you want to do manipulations on NON XML data better to use Java.io.InputStream & OutputStream.
    Regards,
    Rao.Mallikarjuna

  • Special Character Problem In MS Excel

    Hi All,
    I have a field like Ship to Name and value of that field is 'Fire Systems US - Northford ' .When we download this field into Microsoft excel we are getting like Fire Systems US âu20ACu201C Northford . Hear special character (âu20ACu201C) is updating insted of Hypen(-).
    How can we download the the same ship to name with out any special character in Microsoft excel.
    Please help me.
    Thanks,
    Venkat

    Hi Venkat,
    If you can verify that whether the special character is from SAP or excel. This you need to verify by de-bugging in SAP and then by opening the downloaded file in notepad.
    Please refer the link below for details:
    Link: [Re: FM: GUI_DOWNLOAD not picking initial zero]
    Regards,
    Pranav.

  • Import over network link fails when table and special character.

    I am trying to do an import over the network link. Below is the command I am using to do the import. In the parameter file the table name has "$" sign. Database is on AIX.
    impdp "'/ as sysdba'" PARFILE=par_aml_aud_import.txt LOGFILE=test.log
    PARFILE:
    JOB_NAME=MONTHLY_XYZ_IMPORT
    NETWORK_LINK=XYZ_IMPORT_LNK
    DIRECTORY=XYZ_AUD_IMPORT
    TABLE_EXISTS_ACTION=TRUNCATE
    REMAP_SCHEMA=XYZ:XYZ_AUDIT
    REMAP_TABLESPACE=XYZ_DATA:XYZ_AUDIT_DATA
    REMAP_TABLESPACE=XYZ_INDEX:XYZ_AUDIT_INDEX
    EXCLUDE=GRANT
    TABLES=XYZ.DR$ABC_EFG_CTC1$N, DR$MNO_PQR_CTC1$N
    I have tested this import with following options.
    on the command line TABLES=\"XYZ\".\"DR\$ABC_EFG_CTC1\$N\" ---- (IN THE PARFILE)
    on the command line TABLES=\"XYZ\".\"DR\$ABC_EFG_CTC1\$N\" ---- (WITHOUT USING PARFILE)
    Still my import fails with below error.
    ======================
    ORA-39166: Object ."DR$ABC_EFG_CTC1$N" was not found.
    ORA-39166: Object ."DR$MNO_PQR_CTC1$N" was not found.
    ORA-39166: Object XYZ was not found.
    ORA-31655: no data or metadata objects selected for job
    Job "SYS"."SYS_IMPORT_TABLE_01" completed with 3 error(s) at 07:46:30
    I had more than 20 tables to import. All the other tables get imported except these tables which have special character. I have confirmed that these tables exists in source database.
    Please advice.
    Thanks
    Shelly

    First hint: don't use as sysdba
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm#sthref243
    Instead, create a user with (no more than necessary) export and/or import rights
    user7414922 wrote:
    on the command line TABLES=\"XYZ\".\"DR\$ABC_EFG_CTC1\$N\" ---- (WITHOUT USING PARFILE)Try something like tables=xyz.table\$name
    or
    tables='xyz.table$name'
    TABLES=XYZ.DR$ABC_EFG_CTC1$N, DR$MNO_PQR_CTC1$NSecond table should probably have schema qualifier as well.

  • Change Password with changePasswordForSelf and Special character

    Hi,
    I was trying to use the OIM (9.1.1.0) API to change the password using:
    userIntf.changePasswordForSelf(oldPassword, newPassword, confirmNewPassword);
    This works when I use some standard password.
    The issue appears when I try to enter certain special character: e.g: < or >
    The error returned is :
    <Error (class Thor.API.Exceptions.IllegalInputException): Thor.API.Exceptions.IllegalInputException>
    Exception is: Thor.API.Exceptions.IllegalInputException
    I reckon this is done to prevent injections.
    I didn't see any restriction in any of Oracle documentation and was wondering if you can help me understanding:
    - if you have observed the same issues before
    - which character are affected by this
    - if there is a work around to allow these character
    Thank you.

    That's because the special characters you are using are the scripting tags and it confuses itself with the OIM scripting process, for instance JSP's etc.
    So I would recommend not to do it and have your policies in place which restricts end-user to have a password with such special characters. I did not tried that but you can possibly do that.

  • Htp.p() and special character

    I am trying to use PL/SQL procedure to present my customized item.
    If user type in secial character, e.g. single quote ', in an attribute, I got this error on the page:
    Error 30584: DBMS_SQL has raised an unhandled exception. ORA-06550: line 1, column 327: PLS-00103: Encountered the symbol "03" when expecting one of the following: . ( ) , * @ % & = - + < / > at in is mod not rem <> or != or ~= >= <= <> and or like between ||
    Is there a procedure I can call to encode the special character? I tried htp.ps() and htf.escape_sc(), however they are not dealing with single quote.
    thanks

    I am using a custom item type to display news and annoucements for my intranet.
    The custom item type has an associated procedure that renders it on the front page of my intranet.
    If the end users enter an apostrophe such as ' . in the title custom item type or the body of the custom item type, I get an error message on the page where the custom item type is displayed, such as
    Error 30584: DBMS_SQL has raised an unhandled exception.
    I tried changing the procedure that formats and displays the custom item type so it replaces the quote for example
    v_description := replace(v_description, '''','ampersand#8217;');
    note i am using the ampersand character and not the word so it posts correctly here, the variable is then used as below .
    <td>'||substr(v_description,1,400)||'..</td> .
    but it does not work.
    Is there anyway of trapping what the user is typing in before it gets put into the database and replacing it with a html special character.
    or is my plsql wrong.
    Any help appreciated.

  • Script and special character!!

    Hi ,
    while printing address using address and endaddress, i am getting special character > ( ><(><<)> ( ><(><<)> <(><<)> ) > <(><<)>  inserted between ort01 and ort02 field while printing city in the editor in se71 , everytime i remove it it appear again and again....
    anyone faced something similar ....
    Regards
    Gunjan

    Hi
    Check whether your system is Unicde enabled or not?
    Because in Unicode system there is a chance to get such type of Unwanted special characters.
    Reward points for useful Answers
    Regards
    Anji

  • SAX parser and EntityResolver

    I am using the sample SAXSample.java that comes as part of the XML parser download to parse an XML file that contains references to external entities - for example <!ENTITY E23678 SYSTEM "http://pilot/:13365">
    However the SAX parser never appears to call either the EntityResolver or DTDHandler handlers even though they are set in main.
    Has anyone else experienced this or have a missed something out?
    Any help appreciated.

    public class YourParser extends DefaultHandler implements Runnable
    in yor run method
    saxParser.parse(fileToBeParsed, this); provide implementation to the methods y want in YourParser  class
    //saxParser is an object of javax.xml.parsers.SAXParser

Maybe you are looking for

  • Simple button Button problem

    I am making a group of buttons that when each one is highlighted it displays a graphic on the other side of the screen So after I 2* click on my button and insert frame into the over state I place my picture here but when I run it the picture comes u

  • ITunes won't open after upgrading to 11

    My girlfriend's iPad mini is disabled, so I'm trying to connect it to her old macbook (10.6.8), the one which it is associated with.  Upon plugging in the iPad, I was prompted to update iTunes, because the iPad is running iOS 7 and needs the latest v

  • Run time error while running BDC for production order creation and confirmation:

    Dear Gurus, We have a situation, where the users are trying to do the entries creation of order or confirmation (through manual and BDC). But, if there is any kind of a deficit quantities in consumption or GR quantity, then it is going to run time er

  • Clean Install and Restore from Time Machine

    Hi All, Just after some advice, I'm thinking of doing a clean install of OS X when Mavericks comes out. I've been a Mac user for 13 years and have always used Migration Assistant to move my data over whenever I've bought a new Mac. I've never done a

  • Condition Type wise billing

    Following is the scenario Customer takes Deliveries from 1st till 14th of every month and on 15th he is billed for all the deliveries (Delivery related billing) Each delivery contains only "one Single Line Item" 6 Different condition types are used t