Class ProcessorXMLUtil
- java.lang.Object
- 
- io.vertigo.quarto.impl.publisher.merger.processor.ProcessorXMLUtil
 
- 
 public final class ProcessorXMLUtil extends Object Classe utilitaire pour une arborescence XML.- Author:
- npiedeloup
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Deque<TagXML>extractUnbalancedTag(char[] content)Recupere la pile des tags qui ne sont pas ouvert et ceux qui ne sont pas fermés correctement dans le XML passé en parametre.static Queue<TagXML>extractUnrepeatableTag(char[] content)Retourne les tags qui posent problème si l'on cherche à supprimer ou répéter ce bloc XML.static intgetFirstBodyIndex(String content)static intgetLastBodyEndIndex(String content)static StringBuilderparseXMLContent(String xmlContent, String tag, ParserXMLHandler handler)Parse the XML content and call XML handler when input tag is found.
 
- 
- 
- 
Method Detail- 
extractUnbalancedTagpublic static Deque<TagXML> extractUnbalancedTag(char[] content) Recupere la pile des tags qui ne sont pas ouvert et ceux qui ne sont pas fermés correctement dans le XML passé en parametre.- Parameters:
- content- Extrait d'un XML correct.
- Returns:
- Pile des tags mal ouverts ou mal fermés
 
 - 
extractUnrepeatableTagpublic static Queue<TagXML> extractUnrepeatableTag(char[] content) Retourne les tags qui posent problème si l'on cherche à supprimer ou répéter ce bloc XML. Ils s'agit donc des tags qui ne sont pas correctement fermés ou correctement ouverts, sauf si ils sont sans effets sur l'arbre XML. Un tag qui est fermé puis ouvert au même niveau dans l'arbre XML, peut etre supprimé ou multiplié sans compromettre l'intégrité XML.- Parameters:
- content- extrait de XML
- Returns:
- Pile des tagXML perturbant la repetition de l'extrait XML
 
 - 
getFirstBodyIndexpublic static int getFirstBodyIndex(String content) - Parameters:
- content- contenu XML
- Returns:
- la position du premier body de tag trouvé dans le XML passé en paramètre
 
 - 
getLastBodyEndIndexpublic static int getLastBodyEndIndex(String content) - Parameters:
- content- contenu XML
- Returns:
- la position de fin du dernier body de tag trouvé dans le XML passé en paramètre
 
 - 
parseXMLContentpublic static StringBuilder parseXMLContent(String xmlContent, String tag, ParserXMLHandler handler) Parse the XML content and call XML handler when input tag is found.- Parameters:
- xmlContent- Input XML content
- tag- Trigger tag
- handler- XML handler of this tag
- Returns:
- result content
 
 
- 
 
-