XML output with UTF8 Encoding scheme

In external partner wants that we provide him an XML file with data, encoded in UTF8 format.
Using the SQL/XML functions I can construct the XML with the structure (shcema) he asks for.
But how can I guarantee that my XML-output is in UTF8, because our oracle database has been built in the default character set WE8ISO8859PI.
I suppose it is not enough to add in front off my document: <?xml version="1.0" encoding="UTF8"?> ?

Jan,
You may want to check on metalink for WE8iso8859P1 to see if it is a subset of UTF8. There are some documents on metalink that discuss the UTF8 character set and ways to pull differenct character sets and conversion from the database depending on what is stored in the database, or changing the database character set to UTF8.
Have you tried a test extract to see if the characters are correct?

Similar Messages

  • Having a xml output with custom xml tags

    Hi All,
    I have a requirement where we need to generate an xml output with a custom set of tags as given below.
    <templates>
    <list>
    <List_no></list_no>
    <List_name> </List_name>
    </List>
    </templates>
    I am not sure how to get the list part as tags within tags.
    I am able to get the output if the tag level is just one level like ,
    <templates>
    <List_no></list_no>
    <List_name> </List_name>
    </List>
    </templates>
    Does anybody know how I could get the multi-level tags. Any help would be much appreciated. Thank you all.
    -Vin

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • Generating XML content with SAX including schema reference

    Hi all, XML newbie question here.
    I'm trying to generate an XML document from a certain file format using SAX, but I can't figure out how to get the generated XML document to include a schema reference.
    Here's the code, it's taken from posts on this forum, so it should be familiar:
    StreamResult streamResult = new StreamResult(out);
            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try {
                TransformerHandler hd = tf.newTransformerHandler();
                Transformer serializer = hd.getTransformer();
                serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
                serializer.setOutputProperty(OutputKeys.INDENT, "yes");
                hd.setResult(streamResult);
                hd.startDocument();
                AttributesImpl atts = new AttributesImpl();
                hd.startElement("http://maul.ddm.apm.bpm.eds.com", "DTR_XML", "DTR_XML", atts);
                hd.endElement("http://maul.ddm.apm.bpm.eds.com", "DTR_XML", "DTR_XML");
                hd.endDocument();
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (TransformerConfigurationException e) {
                e.printStackTrace();
            }Here's the output I get:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <DTR_XML/>
    And I'm looking for output like this (I think - basically I have this dtr_xml.xsd located at the root web directory on http://maul.ddm.apm.bpm.eds.com and I want the generated XML file to reference that schema for validation when parsing):
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <DTR_XML xmlns="http://maul.ddm.apm.bpm.eds.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd"/>

    Yes, you've led me along the right track with the attributes stuff. Here's what I've got right now...
    StreamResult streamResult = new StreamResult(out);
            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try {
                TransformerHandler hd = tf.newTransformerHandler();
                Transformer serializer = hd.getTransformer();
                serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
                serializer.setOutputProperty(OutputKeys.INDENT, "yes");
                hd.setResult(streamResult);
                hd.startDocument();
                AttributesImpl atts = new AttributesImpl();
                atts.addAttribute("", "xmlns", "xmlns", "CDATA", "http://maul.ddm.apm.bpm.eds.com");
                atts.addAttribute("", "xsi", "xmlns:xsi", "CDATA", "http://www.w3.org/2001/XMLSchema-instance");
                atts.addAttribute("", "schemaLocation", "xsi:schemaLocation", "CDATA", "http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd");
                hd.startElement("", "DTR_XML", "DTR_XML", atts);
                hd.endElement("", "DTR_XML", "DTR_XML");
                hd.endDocument();
            } catch (SAXException e) {
                e.printStackTrace();
            } catch (TransformerConfigurationException e) {
                e.printStackTrace();
            }This produces the output I wanted earlier...
    As for the org.xml.sax.helpers.NamespaceSupport, I can't seem to find any documentation on using it anywhere, and the javadoc is cryptic to me. Maybe it's used internally in SAX for tracking namespaces or something like that.
    Another interesting thing to me is that if I use the code you gave:
    atts.addAttribute("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation",
         "xsi:schemaLocation", "CDATA", "http://maul.ddm.apm.bpm.eds.com dtr_xml.xsd");I don't see "http://www.w3.org/2001/XMLSchema-instance" anywhere in the output. Is SAX ignoring the namespace uri argument? It appears so. The javadoc states that the uri argument is "The Namespace URI, or the empty string if none is available or Namespace processing is not being performed." It would appear that Namespace processing is not being done... but I don't know how to turn it on.

  • Urgent ! XML Output with header, body, trailer

    Gurus,
    I am trying to use Report to output an xml file with header, body and trailer regions. However, I find that the tool does not allow me to create a header region with info like <report_date>, <report_name>, <report_desc> etc.
    Moreover, the tool is not flexible that in the group level, it always automatically fills in the outer tag for me even if I intentionally leave it blank.
    So, except using the XML file output function, is there any other way outputing XML file using the tool? Otherwise, I may need to hard code a program to do so!
    Thanks for your advice!
    Shoshi

    Hi
    Reports XML file is driven by your queries and groups therein. This means that the groups (and break groups) are represented in XML form.
    It is not driven by the layout. So your header region does not appear.
    What I suggest is that you need to create a report level formula column in the Data Model. The formula returns date, name and description etc. Since this is a part of Data Model now, it will appear in the XML output.
    Regards
    Sripathy

  • XML Output with nesting of group

    Hi,
    Not sure if this is even possible to resolve but I figured I might as well ask.
    I have a report which is built using a Reference Cursor which outputs to XML. The data is coming back exactly as expected so I am happy that the cursor is working.
    I am now moving into trying to make the report a bit more advanced.
    My aim is to get the XML output looking like:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <!-- Generated by Oracle Reports version 9.0.2.0.3 -->
    <TEST1>
    <STANDARD1>
    <IDENTIFIER>000005385/7743198743</IDENTIFIER>
    <RUNDATE>21-AUG-09</RUNDATE>
    <TABLE1>
    <TABLE1_FIELD1>000708</TABLE1_FIELD1>
    <TABLE1_FIELD2>ABCDEF</TABLE1_FIELD2>
    <TABLE1_FIELD3>123456</TABLE1_FIELD3>
    </TABLE1>
    <TABLE2>
    <TABLE2_FIELD1>Happy</TABLE2_FIELD1>
    <TABLE2_FIELD2>Days</TABLE2_FIELD2>
    <TABLE2_FIELD3>Are Here</TABLE2_FIELD3>
    </TABLE2>
    </STANDARD1>
    </TEST1>
    At the moment the best that I can seem to do is the following using Break Groups.
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <!-- Generated by Oracle Reports version 9.0.2.0.3 -->
    <TEST>
    <STANDARD1>
    <IDENTIFIER>000005385/7743198743</IDENTIFIER>
    <RUNDATE>21-AUG-09</RUNDATE>
    <TABLE1>
    <TABLE1_FIELD1>000708</TABLE1_FIELD1>
    <TABLE1_FIELD2>ABCDEF</TABLE1_FIELD2>
    <TABLE1_FIELD3>123456</TABLE1_FIELD3>
    <TABLE2>
    <TABLE2_FIELD1>Happy</TABLE2_FIELD1>
    <TABLE2_FIELD2>Days</TABLE2_FIELD2>
    <TABLE2_FIELD3>Are Here</TABLE2_FIELD3>
    </TABLE2>
    </TABLE1>
    </STANDARD1>
    </TEST>
    So the Table2 tags are a child of the Table1 grouping. In reality the table2 information should be at the same level as table1.
    Is there anyway in Oracle Reports where you can create the equivilant of a break group but allow multiple groups to have the same level?
    My aim is to allow multiple groups (at least 8) that are a subset of the STANDARD1 tag, but are all at the same level.
    Any ideas?
    Thanks in advance,
    Leanne

    I am facing same problem when i generate the xml from oracle reports. did you get any solution from this problem.
    Thanks in advance,

  • [SOLVED] xfce4 automounting problem on usb dev with utf8 encoded files

    I have problem of auto mounting usb external drive contains utf8 encoded files under xfce4.
    Using hal and dbus for usb device detection.
    Heard that I need to add iocharset=utf8 under fstab or hal fdi configure files and tried them all but didn't work
    usb devices with vfat always got mounted with default charset.
    I found out that exo-mount is the one doing the actual mounting and that it is the one that cannot take all extra mounting options such as iocharset etc.
    Have tried gnome to mount this hard drive and works find with nautilus option that let me set various mount options for each harddrive.
    Is there any way to replace exo-mount with some other alternative mounting tools that work with thunar?
    Any workaround will be helpful as long as I can mount my usb drives with prefer charset so that I don't have to guess all ???marked files.
    Heard that xubuntu replaced that exo-mount with gnome-mount to handle drives with extra mount options such as iocharset.
    but I am pretty new to configuring things and couldn't find the step by step instruction for this so please provide the complete solution.
    Link to the pages that explain workaround would be nice as well.
    Thanks in advance!
    Last edited by axca (2007-10-17 18:24:50)

    Found the patch for exo-mount so that it takes additional mount options HAL suggests.
    https://bugzilla.altlinux.org/attachmen … ction=diff
    Now my usb drive can be mounted with the proper charset.
    Hope this patch helps others with similar situation as well!
    Last edited by axca (2007-10-15 15:41:47)

  • XML validation with an external Schema

    Hi all,
    i'm testing some EJBs under oc4j and I have problems validating some XML documents against an external Schema file.
    The code only uses JAXP classes and interfaces and it's already running with other application servers.
    The code is:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    dbf.setValidating(true);
    dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
    "http://www.w3.org/2001/XMLSchema");
    The setAttribute method of the DocumentBuilderFactory throws an IllegalArgumentException meaning that this feature is not supported.
    Is that true?
    Someone knows another way to perform this validation without hardcoding Oracle libraries' specific code?
    Thanks
    F

    Hi all,
    i'm testing some EJBs under oc4j and I have problems validating some XML documents against an external Schema file.
    The code only uses JAXP classes and interfaces and it's already running with other application servers.
    The code is:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    dbf.setValidating(true);
    dbf.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
    "http://www.w3.org/2001/XMLSchema");
    The setAttribute method of the DocumentBuilderFactory throws an IllegalArgumentException meaning that this feature is not supported.
    Is that true?
    Someone knows another way to perform this validation without hardcoding Oracle libraries' specific code?
    Thanks
    F

  • XML output with multiple tags in one line

    I have not done much XML exporting with SQL. Previously I had just been ending my SQL queries with
    FOR XML RAW ('Company'), ROOT ('Companies'), ELEMENTS;
    and it formatted my query nicely in an XML output. That put every column name as a tag and the cell data within the tag.
    However, now the criteria has changed on me. I need to create a tag with multiple sub tags in it.
    Example: <Location Floor="10" Suite="512" DoorType="Metal">
    But I'll still need other tags to be normal in the XML output such as
    <Address>123 Fake St</Address>
    <City>Springfield</City>
    <Location Floor="10" Suite="512" DoorType="Metal">
    Is there any way to get this XML mixed in the output like above?
    Thank you for any help. 

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • Using RDF XML output with custom java concurrent program.

    Hi, I started investigating the java API and did not find the way to use RDF XML output ? The goal is to use the Bursting engine to send out PDF generated from a "RDF XML" and a RTF template.
    Is there someone that could help be with this ?
    Thanks

    Hi Jacky
    Im looking to write a paper on this subject.
    Basically you can write a java conc program that will take the XML output from the Oracle Report and burst it. So you could tackle it a couple of ways.
    1. Have the JCP call the Oracle Report, sit and wait for it to complete then call the bursting engine with the XML and the control file. this has the advantage that its a single step for users to submit the report on the other hand you'll be writing a JCP specifically for that report.
    2. Write a generic JCP that can burst any XML, a little tougher to write but will have applications all over the Apps suites.
    Regards, Tim

  • Rendering XML output (with large number of columns) to browser breaks

    We have a stored procedure in our database which returns a cursor with over 400 columns.  When we call the stored procedure from within the QT (using mode FixedQueryWithOutput), it renders just fine and very quickly in CSV format.  however, when we attempt to render it (e.g. post it) as HTML format or XML format, it takes a very long time to render (even thought the results come back very quickly). 
    We are using the following specs:
    OS:  Microsoft Vista
    Browser:  IE (v7.0)
    Java:  Java 6, patch 20 (plug-in disabled)
    Any hints/help would be greatly appreciated!

    Hi Aaron,
    Can you limit the output to a very few rows on the 400 columns you have to render?  It might be a memory or a XML parser constraint on the output client.
    Other option: save the XML in a file (WEB area) then try to export & open the saved data with the browser.
    This will tell you if  the error is at the client level. Also, you can examine the output easily, offline.
    This is practically what I'm doing to analyze XML data transferred to and from SAP using various RFCs.
    IE 8.0 never crashed with XMLs having a size of 3Mb or more (approx 60columns, 10000+ rows, 14 different tables).
    Paul.

  • XML Output with multiple categories

    I am driving myself insane trying to get this to output and I can't seem to find much on the internet that is helpful. Sometimes there is 1 category and sometimes there could be 2.
    For example:
    <Article>
    <Heading>Study: Ban on cell phone use hasn't reduced accident rate</Heading>
    <Date>01/02/2010</Date>
    <Contents>Content regarding cell phone use.</Contents>
    <Categories>
    <Category ID="438024898">General Auto News</Category>
    <Category ID="438022448">Electronics</Category>
    </Categories>
    </Article>
    I set myitems with the xml search and can manage to output everything below perfectly, except for the multiple categories.
    <cfloop from="1" to="#arrayLen(myItems)#" index="i">
    #myItems[i].Heading.xmltext#
    #myItems[i].Categories.Category.xmltext#        this outputs only the first one, but I can not seem to get the second.
    </cfloop>
    Thanks for any help in advance!!!!

    <cfloop from="1" to="#arrayLen(myItems[i].Categories.Category#" index="c"
        #myItems[i].Categories.Category[c].xmltext#
    </cfloop>
    OR
    #myItems[i].Categories.Category[1].xmltext#
    #myItems[i].Categories.Category[2].xmltext#
    Category is just a nested array just like your myItems was.
    Or you could do another xmlSearch if you prefer.

  • Please Help Xml output with extra lines after removeNodeChild

    Hi guys. I'm having trouble googling this out.
    Here is the problem. Given an xml document. I read it on my app and manipulate it, then save it when I am done.
    When I remove a child, the output files shows all the extra lines from the formatting and indent. So it looks like a big hole in the xml file after the node is removed. Here is an example
    <bookshelf>
    <books>
    <book>
    <isbn>3349583080580584308</isbn>
    <author>Jon Stewart</author>
    </book>
    <book>
    <isbn>9900909770543356488</isbn>
    <author>Stephen Colbert</author>
    </book>
    </books>
    </bookshelf>
    Node parentNode = jonStewartNode.getParentNode();
    parentNode.removeChild (jonStewartNode);The result of this is the following xml.
    <bookshelf>
    <books>
    <book>
    <isbn>9900909770543356488< /isbn>
    <author>Stephen Colbert</author>
    </book>
    </books>
    </bookshelf>
    How can I output the xml without this extra lines?
    Thanks in advance,
    f(t)
    PS: here is the initialization, and configuration of the TransformerFactory, and Transformer, and finally the save method.
         * Initializes factory instances and member variables.
        private void initialize(){
            try{
                //obtain a trasformer factory to save the file
                this.transformerFactory = TransformerFactory.newInstance();
                this.transformerFactory.setAttribute("indent-number", 4);
                //obtain the transforme
                this.transformer = this.transformerFactory.newTransformer();
                //setup transformer
                this.transformer.setOutputProperty(OutputKeys.METHOD, "xml");
                this.transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                //this.transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount ", "4");
            }catch(TransformerConfigurationException tcex){
                this.logger.logException(this, "errors.storage.xml.configuringXmlTransformer", true, tcex);
         * Saves the DOM document to the XML file.
        private void saveDocument(){
            //verify that the documents is not null
            if(this.document==null)
                return;
            //sincronize document
            synchronized (this.document){
                try{
                    //normalize document
                    this.document.normalizeDocument();
                    //get a document documentSource object out of the document
                    DOMSource documentSource                = new DOMSource(this.document);
                    //create the file output stream
                    FileOutputStream fileOutputStream       = new FileOutputStream( this.file);
                    //create the output stream writer
                    OutputStreamWriter outputStreamWriter   = new OutputStreamWriter(fileOutputStream);
                    //create the stream streamResult out to the file Stream
                    StreamResult streamResult               = new StreamResult(outputStreamWriter);
                    //performe the trasformation
                    transformer.transform(documentSource, streamResult);
                    //clean up
                    outputStreamWriter.close();
                    outputStreamWriter = null;
                    fileOutputStream.close();
                    fileOutputStream = null;
                    documentSource = null;
                } catch (TransformerConfigurationException tcex) {
                    // Error generated by the parser
                    // Log Error
                    this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, tcex);
                } catch (TransformerException tex) {
                    // Error generated by the parser
                    // Log Error
                    this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, tex);
                } catch (Exception ex) {
                    // Unknown error
                    // Log Error
                    this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, ex);
        }

    I have an rtf template which is used to print output in pdf format. I have a table which has many rows which displays data for each record. In order to avoid breaking the page in between the rows of a record , i have added an outer table with single row and column and pasted the data table inside it and changed the row property of outer table to 'Allow Rows to Break Across Pages' to unchecked. It works fine only if the first record set length does not exceed a full page. IF the first record expanded to more than one page, it leaves a blank page at the very first and start the record at the second page. Can you please advise how to solve this issue. Its very URGENT please..

  • Java application doesn't work with utf8 encoding in linux?

    I use Linux OS and local i18n resource file for Java internalization. Below is my source code. The Frame title can be internalized without any problem, but the button text can't be shown correctly. What is the problem with my code? It works fine in Windows XP.
    Locale locale = new Locale("zh", "CN");
              Locale.setDefault(locale);
              ResourceBundle rb = ResourceBundle.getBundle("ui/demo/i18n/ui_demo",locale);
              System.out.println(rb.getString("OK"));
              JFrame frame = new JFrame("");
              frame.setTitle(rb.getString("OK"));
              JButton button = new JButton(rb.getString("OK"));
              frame.add(button);
              frame.setSize(100, 100);
              frame.setVisible(true);

    masijade. wrote:
    What is the default encoding of the system, and what character encoding is used in the file?
    If they are both the same, no problem, if not, then you're going to have to do some converting.
    Edit: of course, I thought that Java used "?" for unknown characters. So, the "black boxes", might also, possibly, be font problems.
    Both of these are only educated guesses, don't take them as Gospel (and, in all likelyhood, they are probably both at least slightly off-base).thanks for this information. But if the problem is OS encoding, why the Frame title can be shown correctly?

  • Alpha Output with Media Encoder

    Hallo
    I would like to use the "Export to Adobe Media Encoder" command in After Effects to send a comp with an Alpha Channel to be coded in the Media Encoder, but this workflow doesn't seem to support Alpha Channels, or am I missing something? I am using CC2014
    Please Help
    Nick

    You want STRAIGHT alpha in almost every case. Avid, FCP, PPro, AE and every other compositing or editing app I've ever used prefer straight alphas.
    Create a custom template using, for example, QuickTime JPEG2000 and pick 32Bit like this.
    You'll end up with a straight alpha QT that will work just fine in any app. If you must have pre-multiplied then you have to use the Render Cue and beware of the edges when compositing.
    Here's the result of the test render in AE. Note the file interpretation and the transparency.
    BTW, you can save the preset (I did) and use it at any time by adjusting AME's preferences.

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

Maybe you are looking for