• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

warning for XmlSerializer

 
Madhu Sagar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Iam using com.sun.org.apache.xml.internal.serialize.XMLSerializer;
object in a class. While compling the class file it is showing following error.
/home/madhu/public_html/madhu/CSP_Descriptive/src/java/OTAHotelDescriptiveRS.java:52: warning: com.sun.org.apache.xml.internal.serialize.XMLSerializer is Sun proprietary API and may be removed in a future release
XMLSerializer xserial = new XMLSerializer();
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

How to remove this warning...
Please help me....
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really shouldn't be using the Sun API. Use Xerces instead.
http://xerces.apache.org/xerces-j/

Sun XML API uses Xerces API internally, so I believe you don't need to change anything, except the import statements.

Hope this helps.
 
Madhu Sagar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranch hand,

Really so nice of you, I am new for parsing. How to use the Xerces. Please guide me in detail.

How i can change the import statement.

Kind Regards,
Madhu
 
Rob Spoor
Sheriff
Pie
Posts: 20659
64
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Madhu Sagar:
How to use the Xerces. Please guide me in detail.

Please ShowSomeEffort. There are even demos on the Xerces website.

How i can change the import statement.

Please tell me that's not a serious question in the intermediate forum? The Xerces website has an API online, so you can see the full packages. Import those and you're done.
 
Madhu Sagar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your time... Now i will try to use it.

Thanks alot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic