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

## org.modeshape.common.xml
Class XmlCharacters

    java.lang.Object
      org.modeshape.common.xml.XmlCharacters

    @Immutable
    public class XmlCharacters

extends Object

A utility class for determining the validity of various XML names, per the XML 1.0 Specification.

Method Summary
`static boolean` | `isValid(int c)` Determine whether the supplied character is a valid character in XML.
`static boolean` | `isValidContent(int c)` Determine whether the supplied character is a valid character in XML content
`static boolean` | `isValidName(int c)` Determine whether the supplied character is a valid non-first character in an XML Name.
`static boolean` | `isValidName(String name)` Determine if the supplied name is a valid XML Name.
`static boolean` | `isValidNameStart(int c)` Determine whether the supplied character is a valid first character in an XML Name.
`static boolean` | `isValidNcName(int c)` Determine whether the supplied character is a valid non-first character in an XML NCName.
`static boolean` | `isValidNcName(String name)` Determine if the supplied name is a valid XML NCName.
`static boolean` | `isValidNcNameStart(int c)` Determine whether the supplied character is a valid first character in an XML NCName.
`static boolean` | `isValidPubid(int c)` Determine whether the supplied character is a valid character in an XML Pubid.
`static boolean` | `isValidSpace(int c)` Determine whether the supplied character is a valid whitespace character in XML

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

Method Detail

### isValidNameStart

    public static boolean isValidNameStart(int c)

  Determine whether the supplied character is a valid first character in an XML Name. The first character in an XML name is more restrictive than the `remaining characters`.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid for an XML Name's first character

### isValidNcNameStart

    public static boolean isValidNcNameStart(int c)

  Determine whether the supplied character is a valid first character in an XML NCName. The first character in an XML NCName is more restrictive than the `remaining characters`.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid for an XML NCName's first character

### isValidName

    public static boolean isValidName(int c)

  Determine whether the supplied character is a valid non-first character in an XML Name. The `first character` in an XML name is more restrictive than the remaining characters.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid character in an XML Name

### isValidNcName

    public static boolean isValidNcName(int c)

  Determine whether the supplied character is a valid non-first character in an XML NCName. The `first character` in an XML NCName is more restrictive than the remaining characters.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid character in an XML NCName

### isValidPubid

    public static boolean isValidPubid(int c)

  Determine whether the supplied character is a valid character in an XML Pubid.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid character in an XML Pubid

### isValid

    public static boolean isValid(int c)

  Determine whether the supplied character is a valid character in XML.

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid character in XML

### isValidContent

    public static boolean isValidContent(int c)

  Determine whether the supplied character is a valid character in XML content

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid character in XML content

### isValidSpace

    public static boolean isValidSpace(int c)

  Determine whether the supplied character is a valid whitespace character in XML

  Parameters:
    `c` - the character
  Returns:
    true if the character is valid whitespace character in XML

### isValidName

    public static boolean isValidName(String name)

  Determine if the supplied name is a valid XML Name.

  Parameters:
    `name` - the string being checked
  Returns:
    true if the supplied name is indeed a valid XML Name, or false otherwise

### isValidNcName

    public static boolean isValidNcName(String name)

  Determine if the supplied name is a valid XML NCName.

  Parameters:
    `name` - the string being checked
  Returns:
    true if the supplied name is indeed a valid XML NCName, or false otherwise

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

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.