How to ignore .dtd

please help me for this problem
I have a xml file: datasources.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
<data-sources>
</data-sources>
and I have this code to parse file xml
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("datasources.xml"));
it works ok if I internet connecting is ok. but if i can't connect to internet, i doesn't work, but throws an Exception:
java.net.UnknownHostException: xmlns.oracle.com
anybody know how to ignore dtd when parse file xml???
please help me, thanks in advance,
TuanTA

Refer
http://www.oracle.com/technology/sample_code/tutorials/parser/domdtd/setup.htm#IgnoreDtd

Similar Messages

  • How to ignore DTD in xml files under JAXB?

    hi,
    I have a program that has to access files which declare they use a DTD that no longer exists on the web in that location.
    we don't have the option to alter the xml files since they don't belong to us!
    I've written an equivalent schema and its all working with the files that have correct DTD references.
    Is there a way to tell the unmarshaller not to attempt to use the DTD that the documents declare?
    thanks,
    asjf

    I've found that by opening a inputstream to the XML file and wrapping it to filter the DTD out altogether and passing that inputstream to JAXB does the trick.
    this seems actually faster, since it doesn't go off on the net to look for the dtd!
    is this not catered for already somewhere??
    thanks,

  • How to ignore blank/null key figure value in BI Queries

    Reports on Multiprovider - we see some cells of a Key figure as blanks. These blanks are interpreted as zeros by the system and calculated accordingly resulting in incorrect values. As per our requirement, we need a count of all hard/real zeros only, not the blanks. For example, if there are 10 rows of which 6 are real zeros and 4 are blanks - our count should be 6 and not 10.
    How to ignore the blanks in BEx queries please?
    Thanks for your help.
    Upender

    Rakesh,
    It is not possible to find a pattern because the report is on a MultiProvider with 2 InfoProviders- Purchasing documents DSO and Material Movements InfoCube.
    Every Purchasing Document has several materials associated with it. These materials are compared with materials in Materials Movement. Not all materials in Purchasing Document are found in Materials Movement. For those Materials found in Materials Movement, the Quantity is obtained. For these found rows, the correct value is showing up - if the quantity is zero, it is showing in reports as zero. If the material is not found in Material Movements then Quantity shows up as blank values.
    My requirement is ignore such blank quantities and not count them. Only Quantities with 0 values should be counted. Currently both blanks and zero values are counted showing inflated count.
    Thanks,
    Upender

  • How to ignore zero in select query

    select * from EINA where  EINAMATNR = <b>yyyy</b> and EINALIFNR = <b>zzzz</b>
    In select query, how to ignore zero? for example, EINAMATNR = 0000000yyyy, EINALIFNR=000zzz
    Maybe I can use LIKE keyword in sql query. Any other way?
    Thanks.

    Use the following conversion routines to convert yyyy & zzzz  to remove the leading zeros and then pass it to your select query.
    For Matnr -> CONVERSION_EXIT_MATN1_INPUT
    For LIFNR ->CONVERSION_EXIT_alpha_input.
       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = yyyy
            IMPORTING
              output = t_lifnr.
          CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
            EXPORTING
              input  = zzzz
            IMPORTING
              output = t_matnr.
    select * from EINA where EINA~MATNR = t_matnr  and EINA~LIFNR = t_lifnr .

  • How to ignore programmatically some items during a query ?

    Hi all,
    The process of my application is like this : first of all the end-user enters some criteria , then he/she presses a button to search for the possible results matching the criteria entered (execute_query). The possible results are displayed through a multirecord based datablock.
    The criteria screen has two parts , say part_a and part_b. When the end-user does not enter any criteria in part_b then the datasource of the results block should be a table , say data_source_1 ; and if some criteria are entered in part_b then the datasource of the results block should be a view , say data_source_2.
    The datasource data_source_1 has less number of columns than the datasource data_source_2 , but all of data_source_1's columns are included into data_source_2.
    So my problem is when the datasource of the results block is set to data_source_1 then there are unknown columns when executing the query (alert error). All of the columns of data_source_2 are included in the results block , and all of the columns of data_source_1 are automatically there because mathematically speaking data_source_1 is included into data_source_2.
    I have tried to use in the pre-query trigger of the results block this statement : set_item_property('results_possibles.column_a',queryable,property_false); but the same error still occurs.
    So how to ignore these items ?
    Thank you very much indeed.

    After looking at what you did to try to solve the problem, I'm not sure what the actual problem is.
    You can make both datasources have the same number of columns by selecting nulls:
    data_source_1: select a, b, c, null as d, null as e from <table>
    data_source_2: select a, b, c, d, e from <view>
    If you have a field which is used to query a column which is included in data_source_2 but not in data_source_1, and that field is populated when you run the query, then just set the block's default_where to ignore that field.
    eg
    data_source_1: where...and c like nvl(:control.c,'%')
    data_source_2: where...and c like nvl(:control.c,'%') and d like nvl(:control.d,'%')...

  • How to ignore the material with error in costing run ck40n

    Hi
    Pls, advice how to ignore parent material form costing run if the components of that material have errors. I need to run the costing run excluding erroneous parent item. Is any configuration on this..
    Pls help..
    K

    Hi Kesharika Goona... 
    If you want to exclude any material from Costing Run, there are two ways...
    1. Go to Material Master, Costing1 view, take the check box "Do Not Cost". If you opt for this check box, the system will not consider this material for costing.
    2. Where you run the standard cost estimate in CK40N, once you save you costing run with the parameters like Costing Variant etc, When you select the "Parameters" agains the Flow step of "Selection", you will be asked to give the inputs like Material Number, Plant etc.
    There, against the Material Number, on the extrem right side, you will see a arrow, press that arrow, and there you can see a tab "Exclude Single Values". There you have to give the material number which you want to exclude from the costing run press "Execute" icon on the botoom-left corner of that pop-up window..
    If you still face problem, pls revert back
    Srikanth Munnaluri

  • How to Ignore Header Line in FCC " Sender Side" .

    Hi SDNrs,
    I am getting a File Data  after FCC with header Data.
    How to Ignore that Header Line coming with actual data...
    Like Employeeid , Name , Deptid
    So this Employeeid , Name , Deptid is also coming as Data.
    Or what approach Should be Used?
    Regards
    Prabhat Sharma.

    Hi,
    Use " Document Offset" parameter in Sender File CC.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Thnaks
    Amit

  • How to ignore a DML operation using error handler.

    In our streams replication application (using Oracle 10G), we have error handler to handle the errors at destination apply process. It uses straight apply process no DML handlers except error handlers. The error handler should just log the error and LCR info into the error log table and discard the DML LCR. Error logging is not a problem. But the problem is how to ignore the error DML LCR and move to next LCR in the same transaction without rollback of the transaction or any error.
    Another question, do I need to use LCR.EXECUTE() procedure to continue the transaction in case of errors?
    Appreciated your help.

    Thanks for reference, confirmation of use of execute function.
    I read those pages and other related pages in "Oracle® Streams Concepts and Administration" too.
    I am able to write an error handler to handle errors with regular apply process. It is logging "no data found" errors but failing in case of foreign key violations. Error handler takes any kind of error and logs a record into errorlog table and ignores the error. I think it is not calling error handler. I checked for handlers in dba_apply_dml_handlers table. There is a handler for Inert, update and delete. I am investigating it further now. If you have any leads, please post.
    Thanks for your time and help.
    Dharma

  • How to ignore updates in mac app store

    Hi, can you tell me how to ignore updates in the mac app store.

    This is the second old thread that you have dug up today with your brand new account and posted a snotty comment. At best the hosts will edit your other comment, but more likely they will delete it. You agreed not to criticize Apple, its products and business decisions earlier today when you opened your new account. You have already violated that commitment.

  • How to ignore nulls in analytic functions ( row_number() and count())

    how to ignore nulls in analytic functions ( row_number() and count())

    Iam attaching test data can any one help me please
    thanks in advanceeeee
    CREATE TABLE TEMP_table
    ACCTNUM NUMBER,
    l_DATE TIMESTAMP(3),
    CODE VARCHAR2(35 BYTE),
    VENDOR VARCHAR2(35 BYTE)
    insert into temp_table values (1,sysdate+1/60,'bso','v1');
    insert into temp_table values (1,sysdate+2/60,'bsof','v1');
    insert into temp_table values (1,sysdate+3/60,'bsof','v2');
    insert into temp_table values (1,sysdate+4/60,'','v1');
    ian executing this my ;
    SELECT acctnum,l_date,vendor,code_1,
           CASE
             WHEN code = 'bsof'
              AND COUNT (DISTINCT code) OVER (PARTITION BY acctnum, vendor) > 1
              AND row_number () OVER (PARTITION BY acctnum, vendor ORDER BY vendor, l_date) != 1
             THEN 'yes'
           ELSE 'no' END result
      FROM  (select  acctnum,l_date,vendor, code code_1, case when code IN ('bso', 'bsof') then code
      else null end code   from  TEMP_TABLE
    ORDER BY acctnum ,l_date);
    my result :
    1    3/23/2011 5:24:34.000 PM    v1    bso    no
    1    3/23/2011 5:48:36.000 PM    v1    bsof    yes
    1    3/23/2011 6:36:41.000 PM    v1    bsof    yes
    1    3/24/2011 11:55:53.000 AM    v1        no
    1    3/23/2011 6:12:38.000 PM    v2    bsof    no
    I need to eliminate nulls  in top query not in inner query (not using where condition in inner query)
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Make DocumentBuilder.parse ignore DTD references

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

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

  • How to ignore the popup message in TCD mode

    Hi All,
    I'm relatively new to all this. Could anyone kindly show me how to ignore those pop up message (which requires click 'yes' 'no') during the TCD recording and replay?
    The trouble I'm having at the moment is that depending on the effective start date, transaction asks either:
    1) Do you want to delimit the existing record in popup window
    2) Do you want to delete the existing record in popup window
    3) record created - no popup
    What I want to achieve is that regardless of any of these messages, I still want the transaction to complete and having data updated.
    Many thanks in advance.

    Hello,
    You can Ignore the message if the message is of following types:
    If no message type is given for the rule with this mode in column MSGTYP, all application log messages are ignored.
    If a particular message type (A, E, I, S, W, X) is specified, application log messages with exactly this type are ignored. If you want several message types (but not all) to be ignored, specify several rules with this mode and the message type to be ignored in each case
    Please refer the below link:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/49/6f57112c293b5be10000000a42189b/frameset.htm
    Hope the data was useful
    Regards,
    Swetha

  • How to build DTD for this element

    How to write DTD for an element which has character data and child element?
    I am trying to write DTD for "paycode" element:
    <paycode lookup="name" source="RT">OT
      <rate type="BASERATE">1.0</rate>
    </paycode>So i have written this so far:
    <!ELEMENT paycode (rate)>
    <!ATTLIST paycode
         lookup (name|code) "code"
         source CDATA #REQUIRED>Where I am going to specify that paycode has character data as well (in my xml its "OT")?
    Thanks

    But when i define my xml as :
    <rules>
    </rules>
    and open it in IE 6.0, the Internet Explorer doesnot
    give me any error message. Any reason?Is the InternetExplorer supposed to validate your XML
    ? I doubt that.
    The XML in itself is valid as long as it matches the
    basic XML syntax rules ("well-formed"). The structure
    matters only when it gets validated against a
    DTD.On http://www.w3schools.com/dtd/dtd_validation.asp webiste it said that "Internet Explorer 5.0 can validate your XML against a DTD."

  • How to Ignore Fiscal Year Variant in BEx Query displayed with FISCYEAR?

    Hi All,
    I am developing a report.
    In which I have taken Fiscal Year in columns.
    When I executed the report Fiscal Year is showing with Fiscal Year Variant, I mean it is displaying as K5/2009.
    Please let me know the settings how to ignore Variant? I mean Fiscal Year should show 2009 only.
    Regards,
    HM.
    Edited by: Hariman on Nov 9, 2010 7:47 AM
    Edited by: Hariman on Nov 9, 2010 8:05 AM
    Edited by: Hariman on Nov 9, 2010 8:13 AM

    Hi,
    Fiscal year variant is compounded to Fiscal year. So in Bex query output it will be the format.
    In case you need to remove the fiscal year variant you need to write customer Exit code.
    -- Selva

  • How to Ignore  the signal?

    Insert a number if the number of digits of that number is greater than its average return true else false.
    So what i'd like to know , (and btw sorry about the other questions) how can it ignore the signal ?
    e.g: number_aux = 53 -> this will be: Number of digits: 2
    Media = (5 +3) / 2 = 4
    ( 2 < 4 ) then return false. now i'd like to find a way to insert -53 (negative) and the output must be the same (false) ignoring de signal "-"
    here is my code:
    In this code if u inserted a negative ( -6 or -53) the output is always true because e takes in mind the signal . How do i tell him to ignore it?
        System.out.println.... 
          int number _aux =Integer.parseInt(... ....etc
                                              int sum = 0;
              int count = 0;
              int media;
              while (number_aux != 0){
              int digit = number_aux % 10;
              number_aux  /= 10;
              sum += digit;
              if(number_aux  >= 0) count++;
              media =(int) (sum / count);
              return (count > media);thank you so much.
    Josh

    I already used my brain LOLO , if new the answer i
    would not be here ask for help lol.
    shiver You forgot to add three or more exclamation marks.
    give me a hint , how to ignore the signal without
    that method ( using my code)If I'd give you any number, how would you do it? What would there conditions and formula be? Think about that. Programming isn't magic. It's finding a step-wise solution to a problem and writing it down.

Maybe you are looking for

  • Does anyone know of an app that designs plans for woodworking?

    I'm looking for an app from the mac app store that can design woodworking plans for a good price, free would be nice but willing to pay for it (if it is absolutely a good app, as you can not return apps haha), I would like to have it in 3D but its no

  • Older BMW Quicktime Videos not Playing

    I have some older 2004 BMW Videos such as Ticker, Ambush, Star etc which I have not played in awhile. These Videos now do not play on my new Intel iMac running the latest version of Quicktime. Any suggestions ?

  • We have a set of oracle clients running on T5220 zones that need some help

    Greetings all - We have a set of oracle clients running on T5220 zones that need some help. If, for example, I execute the query "select (all) from dba_objects", trace output reports 90% of the elapsed time spent under "SQLNet message from client". H

  • Captivate 4

    Within the edit mode I have placed an image and highlighted areas of the slide. However, in the published edition the images and highlight box are not visable at all. I have tried moving the speech bubble and the click box but this has not improved t

  • Can i put a lable to show on the photo itself

    I am a painter and need to put the size visible on the photo itself. I know i can put it in information but i need it visible?  thank you