Java XML: Verifier si un caractère donné est un espace XML valide

Author:

Java XML: Verifier si un caractère donné est un espace XML valide
Download

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

Code testé avec le fichier XML Suivant

<?xml version="1.0" encoding="windows-1252"?>
<!-- Edited by MesEXemple.com -->
<note>
	<to>Sakoba</to>
	<from>Adams</from>
	<heading>Rappel</heading>
	<body>Ne m'oubliez pas ce week-end!</body>
</note>

Cet article Java XML: Verifier si un caractère donné est un espace XML valide est apparu en premier sur .