org.semanticdesktop.aperture.hypertext.linkextractor.html
Class EntityResolver

java.lang.Object
  extended by org.semanticdesktop.aperture.hypertext.linkextractor.html.EntityResolver

public class EntityResolver
extends Object

Utility methods for resolving HTML entities.


Constructor Summary
EntityResolver()
           
 
Method Summary
static String resolveEntities(String text)
          Replaces all HTML character entities with the characters they represent.
static String resolveEntity(String entName)
          Resolves an entity reference or character reference to its value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityResolver

public EntityResolver()
Method Detail

resolveEntities

public static String resolveEntities(String text)
Replaces all HTML character entities with the characters they represent.


resolveEntity

public static String resolveEntity(String entName)
Resolves an entity reference or character reference to its value.

Parameters:
entName - The 'name' of the reference. This is the string between & and ;, e.g. amp, quot, #65 or #x41.
Returns:
The value of the supplied reference, or null if it could not be resolved.


Copyright © 2010 Aperture Development Team. All Rights Reserved.