Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protege.storage.xml
Class XMLUtil

    java.lang.Object
      edu.stanford.smi.protege.storage.xml.XMLUtil

    public class XMLUtil

extends Object

Escape special XML characters. This code was inspired by that from the Apache Xerces project

Constructor Summary
`XMLUtil()`

Method Summary
`static String` | `escape(char ch)` If there is a suitable entity reference for this character, return it.
`static String` | `escape(String source)` Escapes a string so it may be returned as text content or attribute value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLUtil

    public XMLUtil()

Method Detail

### escape

    public static String escape(char ch)

  If there is a suitable entity reference for this character, return it. The list of available entity references is almost but not identical between XML and HTML.

### escape

    public static String escape(String source)

  Escapes a string so it may be returned as text content or attribute value. Non printable characters are escaped using character references. Where the format specifies a deault entity reference, that reference is used (e.g. `&lt;`).

  Parameters:
    `source` - the string to escape.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.