Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Nov 29, 2006

Build an Entity Resolver to Redirect a SAX Parser

This tip shows you how to bulid an entity resolver to "change" a public indentifier into a system identifier. The idea is to override the resolveEntity method of the EntityResolver interface:

public InputSource resolveEntity(String id_public,String id_system)
{
   if (id_public.equals("-//W3C//DTD XHTML 1.0 Transitional//EN"))
      return(new InputSource(
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"));
       
   return null;       
}
Leonard Anghel
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap