Handling Invalid character.

Hello All
My message mapping is failing because of an invalid character and gives the following Exception
com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x1a(:main:, row:1, col:1496905) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException
Upon Investigation i found that the "char #0x1a" is an EndOfFile(EOF) character and on the browser this character looks like ' ' . Is there a way by which i can just ignore this character  so that that mapping does not fail.
Please suggest.
regards
Nilesh Taunk.

Hi Taunk
The following informatio may help you
File Sender: Special Characters in File Names
<b>o Q: I am trying to get the File Adapter to poll a file, which
contains special characters (e.g., accented characters or umlauts)
in its file name. However, irrespectively of the wildcard mask I
specify in the File Adapter sender channel configuration, the file
does not get picked up. Which configuration setting do I need to
change to get my scenario working?</b>
o A: Under certain operating system platforms, such as Solaris, the
APIs used by the Java Runtime (JRE) are not Unicode-aware.
Consequently, the JRE needs to be configured to correctly interpret
the character set it receives from the operating system.
This is configured through the "file.encoding" system property as
well as the "LANG" environment variable.
        Make sure you set "file.encoding" to a character set (such as
ISO-8859-1) that supports the special characters you would like to
process. This system property can be configured by appending
"-Dfile.encoding=<encoding>" to the Java VM parameters section of
the SAP J2EE Config Tool.
Additionally, you need to set the "LANG" environment variable to a
locale that supports more than 7 bits, such as "de.ISO8859-1". The
encoding you specify in the LANG environment variable needs to
match the encoding set via "file.encoding".
You can persistently configure the environment variable by setting
it in the profile $HOME/.sapenv_$HOSTNAME.csh of the <sid>adm user:
setenv LANG de.ISO8859-1
Warm Regards,
Vijay

Similar Messages

  • Handle invalid character tab

    Hi,
    There are some invalid (tab) character coming from the source system. I want to convert this tab character to space.
    I do see the codes posted here in this link.
    My question is?
    1) The following code needs to be put in Uupdate rule?
    2) Can I have a code just to handle the tab character to space instead checking all the characters. Because in my case only the invalid (tab) character is coming in.
    Thanks.
    /people/sap.user72/blog/2006/07/23/invalid-characters-in-sap-bw-3x-myths-and-reality-part-2
    Something you really need in any system. Here is a completely compatible variant that also checks if the InfoObject allows lower case letters.
    DATA: l_d_length like sy-index,
    l_d_char type c,
    l_d_index type sy-index.
    l_d_length = strlen( result ).
    result = COMM_STRUCTURE-/BIC/ZZZ.
    DO l_d_length times.
    l_d_index = sy-index - 1.
    l_d_char = result+l_d_index(1).
    CALL FUNCTION 'RSKC_CHAVL_OF_IOBJ_CHECK'
    IMPORTING
    I_CHAVL = l_d_char
    I_IOBJNM = 'ZZZ'
    *" I_S_COB_PRO =
    *" I_T_COB_PRO_CMP =
    EXCEPTIONS
    CHAVL_NOT_ALLOWED = 1.
    IF SY-SUBRC <> 0.
    result+l_d_index(1) = ' '.
    ENDIF.
    ENDDO.

    Hi,
    1.     You can write the routine to replace invalid character in the update rule.
    2.     you can use the following code to replace only the TAB character:
    FIELD-SYMBOLS: <fs_x> TYPE x,
                   <fs_c> TYPE c.
    DATA:
    invchar(32) TYPE x VALUE ‘09209520’.
    RESULT = COMM_STRUCTURE-/BIC/FIELDNAME.
    ASSIGN invchar TO <fs_x> CASTING.
    ASSIGN <fs_x> TO <fs_c> CASTING.
    TRANSLATE RESULT USING <fs_c>.

  • How can we handle an invalid character while doing loading in bi7 ?

    means procedure and details
         issues:
                 i have taken an invalid character in my flatfile
                  and i want to solve this so that i can see these invalid characters in report correctly
    Please search the forum before posting a thread
    Edited by: Pravender on Feb 4, 2012 11:06 AM

    Hi Nihararanjan,
    This issue has been discussed many times, please search in SDN for more threads.
    You go to t.code RSKC and maintain the Invalid or Special characters and then you can load.
    Check the below doc for the same:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0cdc928-5e2d-2e10-e1bb-ec77bcb5cbfd?QuickLink=index&overridelayout=true
    Regards,
    Raghu

  • XML Publisher Report - Invalid character was  found in text content

    Hi Techies,
    Version Background
    Oracle apps : 11.5.10
    Oracle 9i Database
    Oracle Reports 6i
    I created a XML output type concurrent program and attached a data definition & template to it.
    My program completed with status "Warning".
    The Error is : An invalid character was found in text content.
    Then i downloaded the XML and opened it in notepad++. I found there are 2 weird characters like this ( , )
    FYI, It is a non-Ascii character so not able to paste it in this forum text field. the characters looks like double sided arrow and a forward arrow.
    I also tried loading the XML locally from RTF Template. Again it throws me same error
    Error No: -1072896760: An invalid character was found in text content.
    Additional Information:
    Data is coming from table "gl_alloc_batches.description"
    Encoding Type: UTF-8
    Please Help me how to handle such a non-ascii characters
    Edited by: 868779 on Feb 22, 2012 10:48 PM

    Hi,
    Please find below sql which will find the special characters in column of table,
    SET serveroutput ON size 1000000
    DECLARE
    PROCEDURE gooey (v_table VARCHAR2, v_column VARCHAR2)
    IS
    TYPE t_id IS TABLE OF NUMBER;
    TYPE t_dump IS TABLE OF VARCHAR2 (20000);
    TYPE t_data IS TABLE OF VARCHAR2 (20000);
    l_id t_id;
    l_data t_data;
    l_dump t_dump;
    CURSOR a
    IS
    SELECT DISTINCT column_name
    FROM dba_tab_columns
    WHERE table_name = v_table
    AND data_type = 'VARCHAR2'
    AND column_name NOT IN ('CUSTOMER_KEY', 'ADDRESS_KEY');
    BEGIN
    FOR x IN a
    LOOP
    l_id := NULL;
    l_data := NULL;
    l_dump := NULL;
    EXECUTE IMMEDIATE 'SELECT '
    || v_column
    || ', '
    || x.column_name
    || ', '
    || 'dump('
    || x.column_name
    || ')'
    || ' FROM '
    || v_table
    || ' WHERE RTRIM((LTRIM(REPLACE(TRANSLATE('
    || x.column_name
    || ',''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()_+
    -=,!\`~{}./?:";''''[ ]'',''A''), ''A'', '''')))) IS NOT NULL'
    BULK COLLECT INTO l_id, l_data, l_dump;
    IF l_id IS NOT NULL
    THEN
    FOR k IN 1 .. l_id.COUNT
    LOOP
    DBMS_OUTPUT.put_line ( v_table
    || ' - '
    || x.column_name
    || ' - '
    || TO_CHAR (l_id (k), '999999999999')
    DBMS_OUTPUT.put_line (l_data (k));
    DBMS_OUTPUT.put_line (l_dump (k));
    DBMS_OUTPUT.put_line ('*********************');
    END LOOP;
    END IF;
    END LOOP;
    END gooey;
    BEGIN
    gooey ('GL_ALLOC_BATCHES', 'DESCRIPTION');
    END;
    Thanks,
    Amogh

  • XML Publisher Report ends with Warning -- Invalid Character Error in XML

    Hi,
    I have migrated the standard report 'Invoice Print Selected Invoices' from Reports 6i to XML Publisher. It has to print a Euro(€) in the report. It does not even generate the XML File fully. It gives the below error in the XML File. When i remove the special character, it works fine.
    Please let me know the settings to ensure that XML file also accepts the special characters. How do i get the Euro symbol printed in XML File with out giving Invalid Character Error?
    ===========================================================The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again
    later.
    An invalid character was found in text content. Error processing resource 'http://dfw1svdevapp03.ora.rackspace.com:8040/OA_...
    <C_INV_CURRENCY_SYMBOL>
    N class="m">>
    <LINE_UOM />
    <LINE_UNIT_SELLING_PRICE />
    ===========================================================
    The XML File even does not show which character set it uses. The output file starts with:
    ===========================================================
    <?xml version="1.0" ?>
    - <!-- Generated by Oracle Reports version 6.0.8.25.0
    -->
    ===========================================================

    Hi Tim,
    Thanks for your adhoc response.
    I have gone thru the Document 222663.1 and it says that the Developer 6.0.8.23 is required to handle this problem. We are using almost the updated Developer version i.e., Developer 6.0.8.25. So, this should be handled automatically, but it still errors out. Please suggest.
    Thanks,
    Kesava

  • IPOD Updater - Error 1324 - The Folder path contains an invalid character

    I tried to install ITUNES on an external HD (I didn't want to slow down my computer by putting all of my music on my internal HD). ITunes installed and then crashed. I removed all traces of ITUNES and IPOD that I could find and went to install ITUNES again on my regular internal drive. Now it goes through the installation and REMEMBERS my IPOD serial number (so obviously I can't find all of the files to remove) but doesn't give me a choice of where to install (it still must be trying to install to my external HD) the ITUNES. All I get is the following Error message:
    IPOD Updater - Error 1324 - The Folder path "Program Files" contains an invalid character
    Does anyone have a solution out there?
    Thanks in advance!
    MonsterProb

    IPOD Updater - Error 1324 - The Folder path "Program Files" contains an invalid character
    Interesting. It's choking on the old iPod updater application. (iPod software updates are no longer handled by a standalone application ... that function was folded into iTunes beginning with iTunes 7.0.0.70.)
    Let's try the following procedure.
    Download and install the Windows Installer CleanUp utility:
    Description of the Windows Installer CleanUp Utility
    Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any entries called "ipod for windows \[date]" or "ipod updater \[date]" or just "ipod for windows" in the list of programs in CleanUp, select those entries, and click “remove”.
    Quit out of CleanUp, and restart the PC.
    Does an itunes install go through properly after that?

  • Handle special character in mapping

    Hi Experts,
    I have requirement to handle special character in mapping.
    ö this tiny special charcter comes in I/O file and we cant avoid.
    Refering the given blog:  http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken]
    FILE --- XI --- FILE where Source and target structures are same, using 1:1 mapping with FCC at both the side..
    Input/Output files consist of special charcters ö due to which getting error in mapping.
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x13(:main:, row:8237, col:22) com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x13(:main:, row:8237, col:22) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:157) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java(Compiled Code))
    Do we required Java mapping? Is there any other way to acheive wtihout using Java mapping?
    How can we hadle in mapping?
    Sameer

    ö this tiny special charcter comes in I/O file and we cant avoid.
    Refering the given blog:  http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken]
    What has an ö to do with an ampersand?
    Assign the correct encoding to the file adapter channel.

  • How to handle Invalid characters(Square Box) in BI

    Hi All,
    Daily I am  getting Invalid character(Square Box) issue with 0Material description and material manufacture part number when the it is being loaded to targets.
    This data is being loaded to many data targets and daily they are being failed .
    I have checked the text in MARA Table and found that there also the square box is appearing in the description.But when i copy the text and past it in word document in the place of box it is appearing as space/Tab.
    Can you please help me how to handle this type of issue in BI .
    Thanks in advance

    Hi Binbi1,
       This eror is due to carriage returns which turns into a square box when transferring data, this can not be corrected through the RSKC, this is solved through an ABAP routine in the transformation rules, use this code:
    DATA i_text type c length 60.
    i_text = SOURCE_FIELDS-/BIC/ZMBS_FT1. "this is your material description field
    REPLACE ALL OCCURRENCES OF '#'
              IN i_text WITH ' '.
    REPLACE ALL OCCURRENCES OF '□'
              IN i_text WITH ' '.
    RESULT = i_text.
    I hope this help you....

  • Sax parser returned an exception. Message: Invalid character (Unicode: 0x12

    Hi,
    I'm getting the error 'Sax parser returned an exception. Message: Invalid character (Unicode: 0x12), Entity publicId: , Entity systemId: , Line number: 47, Column number: 75'
    when I try and run a report in BI Answers 10g.
    Apparently it's to do with a Java applet (or piece of Java code anyway) not being sent to an exception so it can't handle it. The problem is that I can't
    run the report to get at some of the views that seem only available at run time. eg. charts.
    Does anyone know how I can see behind the scenes of views without running the report?
    Or does anyone know how to get rid of this error anyway?
    Many thanks,
    - Jenny

    Hi Satya,
    I am facing the same issue. but I am facing this issue with Mozilla Firefox browser only. If I modify same reports in internet explorer I don't get this error.  It seems this issue is with OBIEE 10g version only and Oracle has provided some patches on this in OBIEE 11g .
    You have posted this question long back. If you have got any solution for this then please let me know also.
    Thanks

  • XI XML Parser: tag content with "'", single apostrophe: invalid character

    Hi all,
    we import XML-documents with the file adapter in a sender channel. everything works well.
    But if one of the XML-tag contents contains a single apostrophe ( ' ), then the XML parser stops with an error "An invalid character was found inside an entity reference. ". The message can not be processed. If I test the message content in the mapping -> no error.
    When the single apostrophe is dereferenced by an additional single apostrophe the XML-File can be processed.
    Question: does anybody know how this can be handled because it is not very nice of SAP XI to send single apostrophes in outgoing messages but cannot handle it in incoming messages from other systems? special adapter settings?
    Thank you very much
    regards
    Hans

    check bhavesh reply
    Suppress Special Character
    also check
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
    Implementing a Java Mapping in SAP PI to remove Escape Sequences from a file

  • Handling Chinese character in Oracle B2B

    Hi B2B Gurus,
    Can 10G B2B or 11G B2B handle chinese characters? One of our supplier posting the transactions with non english characters, but those alll are erroring out in B2B. Can B2B hanlde these characters?
    Here is the example:
    PID|F||||CORMORANT,IBM,1RU
    N1|ST|Agility Hungary|93|C019~
    N3|Sz?kesfeh?rv?r, 8000
    N4|Aszalv?lgyi u.||5 |HU|93~
    Here is the error from the log file.
    Element N301 data type must be 'Alphanumeric'. Segment N3 is defined in the guideline at position 3700.{br}{br}This error was detected at:{br}{tab}Segment Count: 16{br}{tab}Element Position: 1 {br}{tab}Characters: 611 through 631
    An invalid character was encountered in a data element.
    Element N401 data type must be 'Alphanumeric'. Segment N4 is defined in the guideline at position 3800.{br}{br}This error was detected at:{br}{tab}Segment Count: 17{br}{tab}Element Position: 1 {br}{tab}Characters: 635 through 649=
    An invalid character was encountered in a data element
    Please help me in resolving this.
    Regards
    RAJ

    Hi Anuj,
    No, we dont have any option such like that....(encoding)
    Here are the parameters for File/FTP while configure delivery channel.
    polling interval 1
    base directory
    sender cipher suites
    receiver cipher suites
    sender channel mask None
    receiver channel mask None
    receiver proxy host
    receiver proxy port
    receiver proxy username
    receiver proxy password
    receiver proxy auth type
    receiver control port
    receiver data port
    receiver regular expression
    receiver read only
    receiver read ordered
    receiver read ordered timestamp source
    receiver read ordered timestamp format
    receiver read ordered timestamp offset
    receiver file minimum age(in ms) 0
    filename format %FROM_PARTY%_%TIMESTAMP%.dat
    directory name format
    Transport Callout Class
    Transport Callout Library
    Transport Callout Properties
    Transport Callout Timeout(in seconds) 30
    Internal delivery channel filename format
    Filename format separator
    Directory name format separator
    transfer mode
    Enable Marker false
    Archival directory /ftpdata/elshas1/avnt/archive/850/PO
    is VAN Mailbox false
    Clear command channel false
    Preserve Filename false
    Please help me in resolving this ?
    Regards
    RAJ

  • Hexadecimal value 0x10, is an invalid character. Line 1, position 228.

    getting started with Azure.
    I installed VS2013, the Azure SDK for VS2013 and web deploy 3.5
    following the steps on this post
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    When I try to deploy to a website created in Azure with DB, I get
    Error 1
    '', hexadecimal value 0x10, is an invalid character. Line 1, position 228.
    The details:
    Transformed Web.config using C:\Projects\ContactManager\ContactManager\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
    Copying all files to temporary location below for package/publish:
    obj\Release\AspnetCompileMerge\Source.
    C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Projects\ContactManager\ContactManager\obj\Release\AspnetCompileMerge\Source -u -c C:\Projects\ContactManager\ContactManager\obj\Release\AspnetCompileMerge\TempBuildDir 
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets(42,5): Error : '', hexadecimal value 0x10, is an invalid character. Line 1, position 228.
    I have tried uninstalling VS2013, the SDK and even web deploy and reinstalling them and that didn't help.
    One caveat:
    when I try to deploy to a website created without DB, I get don't get the error above.
    any help appreciated
    UPDATE:
    Figured it out.
    My DB Password had the "%" character. I guess that's not well handled by Visual Studio at the moment.
    After removing the "%" character from my DB password, I was able to deploy again.

    Hi,
    Figured it out.
    My DB Password had the "%" character. I guess that's not well handled by Visual Studio at the moment.
    After removing the "%" character from my DB password, I was able to deploy again.
    I'm glad to hear that you have found out the solution, I will close this thread, thanks for your posting, if you have any issues, welcome to our forum again.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 'The folder path "C:" contains an invalid character.' ERROR AS I INSTALL iTunes

    hi
    first of all, merry xmas to all that celebrate! i hope you had/have a memorable day!
    and wishing everyone the very best for the new year.
    Now, I have a problem when I try to install iTunes on my computer. I'm running:
    - Windows Vista (Home Basic)
    - iTunes 10.5.2.11
    i have sufficient hard-drive space and sufficient ram. its definetly NOT from that. I originially DID HAVE iTunes already installed on my computer, but I was frequently having problems with establishing a connection through my iPhone 4. So I thought it would be a good idea to delete it and try downloading a new version, then install it fresh!
    I have some computer skills and knowledge, and i know how "most" things work and run. But now I am totally stuck. I run the iTunes software to be installed, but the installer keeps giving me an error message and NOT installing. I've done all the easy and required steps after I deleted the original version of iTunes from my computer, and now I need help from someone who really knows their stuff in IT and computer software. I have a feeling it may be a string of codes that are corrupt or significantly different to what they should be, but thats just my guess! cos like i already said, ive tried all the common fixes already but have been unsuccessful thus far. Some of the things I did were:
    - Restart the computer, re-boot, login to Windows, run the iTunes installation
    - Turn off the computer, wait 10 minutes, re-boot and then run the iTunes installation
    - Delete ALL the "Apple" company software that was still installed on my computer (QuickTime, iPhone Utility, iPod, Bonjour, etc etc)
    - Confirm my "User Account Control" is OFF
    - Run the iTunes installation file from my secondary windows login account (which has "Administrator" privilages)
    - Create a new windows login account, turn off the UAC (User Account Control protection), then try installing iTunes
    - Run disk-error checks on my hard-drives incase there are missing/corrupt/misplaced files that needed repair
    etc etc etc etc
    Nothing worked! THIS BELOW IS EXACTLY THE PROBLEM I KEEP GETTING WHEN I DOUBLE-CLICK ON THE iTUNES INSTALLER:
    - Double click on the iTunes install icon
    - The "Trusted File Security Warning/Confirmation" window appears, requesting I confirm to Run or Cancel the software installation. I click on "Run"
    - A horizontal grey bar appears in the middle of the screen, and quickly fills up green
    - Then a small installation windows appears (Windows Installer) that writes "Preparing to Install". Then it very fast writes a couple different sentences (which is normal), specifically the sentences are "Performing installation checks" and "Checking spacing requirements".
    - immedietly after the previous step, another window appears and I hear the "error" audio tone. The ERROR MESSAGE has the Yellow Triangle logo with an exclamation mark in the middle, and beside it displays the following text (and Ive attatched the screen shot too):
    THE FOLDER PATH "C:" CONTAINS AN INVALID CHARACTER
    then below this message theres the "OK" button which I have no choice but to click on. then the next window that appears is as follows (see screenshot), and it reads:
    iTunes Installer Completed
    The installer encountered errors before iTunes could be configured.
    Errors occured during installation. Your system has not been modified.
    Please run the installer again, or click Finish to exit
    Please I beg you guys to help me, I will be extremely grateful for ALL and ANY advice/tips/assistance/solutions I receive. And would owe you one for sure!!
    Please feel free to write your opinions and thoughts on what I could do different, as Ive used up all my knowledge regarding the matter, and have seriously hit a brick wall now.
    Thanks so so so much, and once again I wish everyone the absolute very best!
    regards.
    PS. Replies can be posted in this thread, otherwise even sent to me via email if you wish to do otherwise. My email address is:  [email protected]
    cheers

    Resolution:
    Check for the existence of a hidden folder named %appdata% in the C:\Program Files\Microsoft Application Virtualization\Client folder.  (You will need to un-check the folder options box in windows explorer for "Hide
    protected operating system files" to see it)
    If the hidden %appdata% folder exists, delete it.
    Proceed to uninstall the App-V client
    After a clean uninstall and removal of remnants of the client, reinstall the client again and apply the latest hotfix available (Hotfix 2 for SP2 at a minimum).

  • Log on problem India: Invalid character

    Dear all,
    we have running a BI 7.0 Portal. We have a guidline how to set up the Internet-Settings (IE 6) for using the portal. It works fine for all our subsituaries, with exeption of India.
    In India, we get the log on screen and we can enter the user name and PW. By confirming this data, we receice the message:
    Line:  2
    Char: 1
    Code: 0
    Error: Invalid character
    Additionaly we receive the following message:
    Line: 1161
    Char: 1
    Error: 'EPCM.getSAPTop().gHistoryFrameworkObj'is null or not an object
    Code: 0
    Do you know how to analyse or solve the problem?
    Thanks!
    XmxhX
    Edited by: XmchX on Mar 19, 2008 8:20 AM

    Hello,  
    See this thread and see whthere its applicable to you,
    Error while accessing portal.....
    Thanks
    Chandran

  • XML invalid character -  a single quote problem

    Hi, I am reading in an xml file, then write the file to output. The problem is that the input file has a strange single quote character [ *�*  ] - lets call it single quoate A, which is different from [  *'*  ] , that is the key next to the [ ; ] key on an English keyboard - lets call it single quate B. And in fact there isnt a key to input single quote A, I guess the appearance of single quote A is due to encoding.
    If I open the input xml file in browser, it works ok and displays the single quote A.
    Once I read in the xml file into memory, by debugging I can still see that single quote A is corrected encoded;
    However once I rewrite the same content to output, the single quote A character is changed, and if i open the file in browser, it says 'invalid character' because single quote A were changed when written to output and cannot be rendered.
    Both input and output xml are using UTF-8 encoding. How can I solve this problem please?
    The xml file looks:
    <?xml version="1.0" encoding="UTF-8" ?>
    <content>....1980�s (Peacock and Williams, 1986; Keay, 1984)</content> My code for reading
    String _xquery ="//content/text()";
    Document _xmlDoc= DocumentBuilderFactory.newInstance().newDocumentBuilder().parse("myxml.xml");
    XPath _xpath = XPathFactory.newInstance().newXPath();
    NodeList nodes = (NodeList) _xpath.compile(query).evaluate(_xmlDoc, XPathConstants.NODESET);
    List<String> res = new ArrayList<String>(nodes.getLength());
    for (int i = 0; i < nodes.getLength(); i++) {
        res.add(nodes.item(i).getNodeValue());
    String valueToOuput=res.toString() //this is the value to be output to xml, it shoud look like "[....1980�s (Peacock and Williams, 1986; Keay, 1984)]"my code for writing xml
    Element root=new Element("root");;
    Element content= new Element("output-content")
    content.setText(valueToOutput);
    root.addContent(content);
    PrintWriter writer = new PrintWriter(new FileWriter(f));
    new XMLOutputter().output(domDocument, writer);
    writer.close();

    Hi, sorry I have fixed the problem... instead of using PrintWriter, I used Fileoutputstream, and it solved the problem. Thanks!

Maybe you are looking for

  • Upgrading from xppro, sp 3 to win 7 pro

    hi, my x201 thinkpad came with xppro installed, at my request; now, i want to upgrade to win 7 pro. Lenovo supplied the win 7 discs with this machine. here's the issue, which makes me feel that i made a bad choice in systems i had thought that win 7

  • 500 Internal Server Error. Failed to process request. Please contact....

    Hi Experts, The user is able to login successfully into portal. When the user is clicking on Travel & Expenses page an error is coming as below: 500 Internal Server Error. Failed to process request. Please contact your system administrator. Please ad

  • MM-Physical Inventory

    Hi all, Is it possible to do backdated Physical Inventory for Customer Consignment?? I have tried it however sysyem always compares stock with the current stock and posts the difference ,,,not with reference to the back date i am referring to,, Exper

  • Mass Upload OF Inforecord Text

    Dear All, Pelase let me know any way is available to upload INFORECORD TEXT in MASS. Like price, date by using LSMW or MASS/MESSAIN.If it is available in LSMW, pl let me know the procedure to do it.. Please help me out. Regards, Nagaraj S Edited by:

  • Is my JVM capable of checking out countable options?

    or does it depend on the computer it self? hi, I've written a program that needs to check out numerous options to arrange 1024 values in a matrix of 32*32. It doesn't need storage room for more than that, but it does go through the process of checkin