Whether the given character is a valid XML space. : XML Data « XML « Java






Whether the given character is a valid XML space.

 

public class Utils {

  /**
   * Tests whether the given character is a valid space.
   */
  public static boolean isXMLSpace(char c) {
    return (c <= 0x0020) &&
           (((((1L << 0x0009) |
               (1L << 0x000A) |
               (1L << 0x000D) |
               (1L << 0x0020)) >> c) & 1L) != 0);
  }

}

   
  








Related examples in the same category

1.Streaming XML
2.extends DefaultHandler to create a XML binding
3.Your won XML binding
4.Parse and format xs:dateTime values
5.Replaces all XML character entities with the character they represent.
6.Sniffed Xml InputStream to find out the declaration and file encoding
7.JAXP 1.3 Datatype API
8.Common XML constants.
9.Sniffed Xml Reader
10.Source To InputSource
11.Utility class for working with xml data
12.whether the given 32 bit character is a valid XML 1.1 character.