You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by IndianAtTech <in...@gmail.com> on 2004/11/20 07:41:16 UTC

How to get rid from Xreces deprecated warnings

Hello Friends,

when I compile the class I get following warnings. And I don't want to
use the depercated API in my application. So what are the new classes
and methods I need to use in my class.  I have downloaded
Xerces-J-bin.2.6.0 API from the jakara project

Thanks Sudhakar


AttachmentParser_Xerces.java:3: warning: org.xml.sax.AttributeList in org.
xml.sax has been deprecated
import org.xml.sax.AttributeList;
                   ^
AttachmentParser_Xerces.java:4: warning: org.xml.sax.HandlerBase in org.xm
l.sax has been deprecated
import org.xml.sax.HandlerBase;
                   ^
AttachmentParser_Xerces.java:5: warning: org.xml.sax.Parser in org.xml.sax
 has been deprecated
import org.xml.sax.Parser;
                   ^
AttachmentParser_Xerces.java:8: warning: org.xml.sax.helpers.ParserFactory
 in org.xml.sax.helpers has been deprecated
import org.xml.sax.helpers.ParserFactory;
                           ^
AttachmentParser_Xerces.java:21: warning: org.xml.sax.HandlerBase in org.x
ml.sax has been deprecated
    extends HandlerBase { //implements org.xml.sax.ContentHandler
            ^
AttachmentParser_Xerces.java:36: warning: org.xml.sax.AttributeList in org
.xml.sax has been deprecated
  public void startElement(String name, AttributeList attrs) {
                                        ^
ExchangeEmailDetails.java:3: warning: org.xml.sax.AttributeList in org.xml
.sax has been deprecated
import org.xml.sax.AttributeList;
                   ^
ExchangeEmailDetails.java:4: warning: org.xml.sax.HandlerBase in org.xml.s
ax has been deprecated
import org.xml.sax.HandlerBase;
                   ^
ExchangeEmailDetails.java:5: warning: org.xml.sax.Parser in org.xml.sax ha
s been deprecated
import org.xml.sax.Parser;
                   ^
ExchangeEmailDetails.java:8: warning: org.xml.sax.helpers.ParserFactory in
 org.xml.sax.helpers has been deprecated
import org.xml.sax.helpers.ParserFactory;
                           ^
AttachmentParser_Xerces.java:36: warning: org.xml.sax.AttributeList in org
.xml.sax has been deprecated
  public void startElement(String name, AttributeList attrs) {
                                        ^
11 warnings
C:\>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: How to get rid from Xreces deprecated warnings

Posted by Brian Minchau <mi...@ca.ibm.com>.



Sudhakar,
in general (not just for this class) I find it very useful to go to
www.google.com and enter the class name and the word "documentation" for
the search string. In this case the search text would be:

    org.xml.sax.AttributeList documentation

For me the first link on the page the search result page is the one you are
interested in.  http://java.sun.com/j2se/1.4.2
/docs/api/org/xml/sax/class-use/AttributeList.html

On this Javadoc page you can see that the method is deprecated. It also
gives information on what it has been replaced by.

You can't beat Javadoc and a good search engine with the right keywords.
Please try trick for each of the classes of interest.

----------
Brian Minchau
XSLT Development, IBM Toronto
e-mail:        minchau@ca.ibm.com



                                                                           
             IndianAtTech                                                  
             <indianattech@gma                                             
             il.com>                                                    To 
                                       xerces-j-dev@xml.apache.org         
             11/20/2004 01:41                                           cc 
             AM                                                            
                                                                   Subject 
                                       How to get rid from Xreces          
             Please respond to         deprecated warnings                 
               xerces-j-dev                                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hello Friends,

when I compile the class I get following warnings. And I don't want to
use the depercated API in my application. So what are the new classes
and methods I need to use in my class.  I have downloaded
Xerces-J-bin.2.6.0 API from the jakara project

Thanks Sudhakar


AttachmentParser_Xerces.java:3: warning: org.xml.sax.AttributeList in org.
xml.sax has been deprecated
import org.xml.sax.AttributeList;
                   ^
AttachmentParser_Xerces.java:4: warning: org.xml.sax.HandlerBase in org.xm
l.sax has been deprecated
import org.xml.sax.HandlerBase;
                   ^
AttachmentParser_Xerces.java:5: warning: org.xml.sax.Parser in org.xml.sax
 has been deprecated
import org.xml.sax.Parser;
                   ^
AttachmentParser_Xerces.java:8: warning: org.xml.sax.helpers.ParserFactory
 in org.xml.sax.helpers has been deprecated
import org.xml.sax.helpers.ParserFactory;
                           ^
AttachmentParser_Xerces.java:21: warning: org.xml.sax.HandlerBase in org.x
ml.sax has been deprecated
    extends HandlerBase { //implements org.xml.sax.ContentHandler
            ^
AttachmentParser_Xerces.java:36: warning: org.xml.sax.AttributeList in org
.xml.sax has been deprecated
  public void startElement(String name, AttributeList attrs) {
                                        ^
ExchangeEmailDetails.java:3: warning: org.xml.sax.AttributeList in org.xml
.sax has been deprecated
import org.xml.sax.AttributeList;
                   ^
ExchangeEmailDetails.java:4: warning: org.xml.sax.HandlerBase in org.xml.s
ax has been deprecated
import org.xml.sax.HandlerBase;
                   ^
ExchangeEmailDetails.java:5: warning: org.xml.sax.Parser in org.xml.sax ha
s been deprecated
import org.xml.sax.Parser;
                   ^
ExchangeEmailDetails.java:8: warning: org.xml.sax.helpers.ParserFactory in
 org.xml.sax.helpers has been deprecated
import org.xml.sax.helpers.ParserFactory;
                           ^
AttachmentParser_Xerces.java:36: warning: org.xml.sax.AttributeList in org
.xml.sax has been deprecated
  public void startElement(String name, AttributeList attrs) {
                                        ^
11 warnings
C:\>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org