Java XML: Normaliser tout le texte d’un document

Author:

Java XML: Normaliser tout le texte d'un document
Download

/***** Code de MesExemples.com *******/
 public void normalize(Document doc) 
 	{        
 		Element root = doc.getDocumentElement();        
 		root.normalize();    
 	}                 
     

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: Normaliser tout le texte d’un document est apparu en premier sur .