---
sourceDocument: Référence API Brésil
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/fr-FR/api-reference

 Release :

    - brazil

ft:locale :

    - fr-FR

ft:publication_title :

    - Référence API Brésil

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# XMLDocument2 : champ d'application, global

# XMLDocument2 : champ d'application, global {#ariaid-title1}

Rversion finale: Brazil  
Mis à jour 10 sept. 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 8 minutes de lecture  
L'API XMLDocument2 est une couche d'objet JavaScript permettant d'analyser et d'extraire des données XML à partir d'une chaîne XML.

Utilisez cette classe JavaScript pour créer un objet à partir d'une chaîne XML, généralement une valeur de retour d'un appel de service Web, ou la charge utile XML de la file d'attente ECC. L'utilisation de l'objet XMLDocument2 dans une règle métier JavaScript vous permet d'interroger directement les valeurs des éléments et attributs XML.

Une chaîne XML a une arborescence et les parties de la structure sont appelées nœuds. Un objet XMLDocument2 traite deux types de nœuds, l'élément et l'élément document. Un nœud d'élément est un nœud avec un nom et éventuellement des attributs et des nœuds enfants. Un nœud document-élément est le nœud racine de l'arborescence XML. Il s'agit du seul nœud sans nœud parent.  
Remarque :  
Cette API fonctionne pour les applications incluses dans le périmètre ou globales.

## XMLDocument2 inclus dans le champ d'application : XMLDocument2() {#ariaid-title2}

Crée un objet XMLDocument2.
{#r_ScopedXMLDocument2XMLDocument2__table_jqf_pkr_2r__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucune |   |   |
[Tableau 1. Paramètres]

{#r_ScopedXMLDocument2XMLDocument2__table_jqf_pkr_2r}

## XMLDocument2 inclus dans le champ d'application : XMLDocument2 (GlideScriptableInputStream, inputStream) {#ariaid-title3}

Crée un objet XMLDocument2 à partir d'un flux de pièces jointes.
{#r_SXMLDoc2-XMLDocument2_GSIS__table_qjv_tmt_3x__entry__3}

| Nom | Type | Description |
|-|-|-|
| Flux d'entrée | GlideScriptableInputStream | Flux d'entrée encapsulé par l'objet XMLDocument2. |
[Tableau 2. Paramètres]

{#r_SXMLDoc2-XMLDocument2_GSIS__table_qjv_tmt_3x}

## XMLDocument2 dans le champ d'application : createElement(nom de chaîne) {#ariaid-title4}

Crée et ajoute un nœud d'élément au nœud actuel. Le nom de l'élément est la chaîne transmise en tant que paramètre. Le nouvel élément n'a pas de nœuds enfants de texte.
{#r_ScopedXMLDocument2CreateElement_String__table_plz_zr4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| nom | Chaîne | Le nom du nouvel élément. |
[Tableau 3. Paramètres]

{#r_ScopedXMLDocument2CreateElement_String__table_plz_zr4_1r} {#r_ScopedXMLDocument2CreateElement_String__table_efn_ffc_2r__entry__2}

| Type | Description |
|-|-|
| Code XML | Nœud XML actuel. |
[Tableau 4. Renvoie]

{#r_ScopedXMLDocument2CreateElement_String__table_efn_ffc_2r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString); 
    xmlDoc.createElement("new2"); 
     
    gs.info(xmlDoc);

Sortie :

    ?xml version="1.0" encoding="UTF-8"?>
    <test>  
        <one>    
            <two att="xxx">abcd1234</two>    
                <three att="yyy" boo="yah">1234abcd</three>    
            <two>another</two>  
        </one>  
        <number>1234</number>
        <new2></new2>
    </test>

## XMLDocument2 dans le champ d'application : createElementWithTextValue (nom de chaîne, valeur de chaîne) {#ariaid-title5}

Crée et ajoute un nœud d'élément avec un nœud enfant de texte au nœud actuel.
{#r_ScopedXMLDocument2CreateElementWithTextValue_String_String__table_rxl_qs4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| nom | Chaîne | Nom de l'élément à ajouter. |
| valide | Chaîne | Valeur de texte de l'élément. |
[Tableau 5. Paramètres]

{#r_ScopedXMLDocument2CreateElementWithTextValue_String_String__table_rxl_qs4_1r} {#r_ScopedXMLDocument2CreateElementWithTextValue_String_String__table_txl_qs4_1r__entry__2}

| Type | Description |
|-|-|
| Code XML | Nœud XML actuel. |
[Tableau 6. Renvoie]

{#r_ScopedXMLDocument2CreateElementWithTextValue_String_String__table_txl_qs4_1r}  

    var xmlString = "<test>" +
        "  <one>" +
        "    <two att=\"xxx\">abcd1234</two>" +
        "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
        "    <two>another</two>" +
        "  </one>" +
        "  <number>1234</number>" +
        "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString); 
    xmlDoc.createElementWithTextValue("new", "test");
    gs.info(xmlDoc);

Sortie :

    <?xml version="1.0" encoding="UTF-8"?>
        <test>
            <one>
                <two att="xxx">abcd1234</two>    
                <three att="yyy" boo="yah">1234abcd</three>    
                <two>another</two>  
            </one>  
            <number>1234</number>
            <new>test</new>
        </test>

## XMLDocument2 dans le champ d'application : getDocumentElement() {#ariaid-title6}

Obtient le nœud d'élément de document de l'objet XMLdocument2. Le nœud d'élément de document est le nœud racine.
{#r_ScopedXMLDocument2GetDocumentElement__table_cvr_4kr_2r__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucune |   |   |
[Tableau 7. Paramètres]

{#r_ScopedXMLDocument2GetDocumentElement__table_cvr_4kr_2r} {#r_ScopedXMLDocument2GetDocumentElement__table_t2h_k54_1r__entry__2}

| Type | Description |
|-|-|
| Code XML | L'élément de document. |
[Tableau 8. Renvoie]

{#r_ScopedXMLDocument2GetDocumentElement__table_t2h_k54_1r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);
    //returns the root node of the document tree.
    var rootNode = xmlDoc.getDocumentElement();
    gs.info(rootNode.getTextContent());

Sortie :

    abcd1234    1234abcd    another    1234

## XMLDocument2 dans le champ d'application : getFirstNode(String xPath) {#ariaid-title7}

Obtient le premier nœud dans le xPath spécifié.
Cette méthode ne prend en charge qu'un sous-ensemble d'expressions xPath de prédicat. Par exemple, supposons le document suivant :

    <store> 
        <resources company="ABC Inc"> 
            <resources type="servers" /> 
        </resources> 
        <resources company="XYZ Inc"> 
            <resource type="bookstore"> 
                <book> 
                    <title>Windows</title> 
                    <price>10</price> 
                </book> 
                <book year="2009"> 
                    <title>Harry Potter</title> 
                    <price>50</price> 
                </book> 
                <book year="1999"> 
                    <title>Learning XML</title> 
                    <price>120</price> 
                </book> 
                <book year="2019"> 
                    <title>Learning Java</title> 
                    <price>99</price> 
                </book> 
            </resource> 
        </resources> 
    </store> 

Cette méthode prend en charge les expressions xPath suivantes avec prédicats :

    "/store/resources/resource[@type='bookstore']/book[@year='1999']", 
    "/store/resources/resource[@type='bookstore']/book[@year]", 
    "/store/resources/resource[@type='bookstore']/book[price > 100]" 

Toutefois, il ne prend pas en charge les expressions xPath suivantes avec prédicats :

    "/store/resources/resource[@type='bookstore']/book[2]", 
    "/store/resources/resource[@type='bookstore']/book[last()]", 
    "/store/resources/resource[@type='bookstore']/book[position()>2]" 

Pour contourner ce problème, utilisez xPath sans prédicats, tels que `<< /store/resources/resource[@type='bookstore']/book >>), ` puis filtrez les nœuds dans le script à l'aide des méthodes getFirstNode() et [getNextNode().](https://servicenow-prod.fluidtopics.net/Y196b6CKv2Ab5OnXnK_uRw#r_ScopedXMLDocument2GetNextNode_Object "Obtient le nœud après le nœud spécifié.")
{#r_ScopedXMLDocument2GetFirstNode_String__table_wg1_nq4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| xPath | Chaîne | xPath à partir duquel obtenir le nœud. |
[Tableau 9. Paramètres]

{#r_ScopedXMLDocument2GetFirstNode_String__table_wg1_nq4_1r} {#r_ScopedXMLDocument2GetFirstNode_String__table_yg1_nq4_1r__entry__2}

| Type | Description |
|-|-|
| Code XML | Le premier nœud. |
[Tableau 10. Renvoie]

{#r_ScopedXMLDocument2GetFirstNode_String__table_yg1_nq4_1r}  

    var xmlString = "<test>" +
      "  <one>" +
      "    <two att=\"xxx\">abcd1234</two>" +
      "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
      "    <two>another</two>" +
      "  </one>" +
      "  <number>1234</number>" +
      "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);
    var foo = xmlDoc.getFirstNode('/test/one/two');
    gs.info(foo.getTextContent());

Sortie :

    abcd1234

## XMLDocument2 dans le champ d'application : getNextNode(Objet actuel) {#ariaid-title8}

Obtient le nœud après le nœud spécifié.
{#r_ScopedXMLDocument2GetNextNode_Object__table_ysr_fr4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| current | Objet | Le nœud actuel. |
[Tableau 11. Paramètres]

{#r_ScopedXMLDocument2GetNextNode_Object__table_ysr_fr4_1r} {#r_ScopedXMLDocument2GetNextNode_Object__table_atr_fr4_1r__entry__2}

| Type | Description |
|-|-|
| Code XML | Le nœud suivant. |
[Tableau 12. Renvoie]

{#r_ScopedXMLDocument2GetNextNode_Object__table_atr_fr4_1r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);
    var foo = xmlDoc. getFirstNode('/test/one/two');
    var foo2 = xmlDoc.getNextNode(foo);
    gs.info(foo.getTextContent());
    gs.info(foo2.getTextContent());

Sortie :

    abcd1234

    another

## XMLDocument2 inclus dans le champ d'application : getNode(String xPath) {#ariaid-title9}

Obtient le nœud spécifié dans xPath.
Remarque :  
Cette méthode est destinée à être utilisée avec de petits documents car elle analyse l'ensemble du document pour qu'il corresponde à l'expression xPath. Si le document est trop volumineux, une erreur de mémoire insuffisante peut se produire. Pour les documents volumineux, utilisez les méthodes [getFirstNode(String xPath)](https://servicenow-prod.fluidtopics.net/Y196b6CKv2Ab5OnXnK_uRw#r_ScopedXMLDocument2GetFirstNode_String "Obtient le premier nœud dans le xPath spécifié.") et [getNextNode(Object current),](https://servicenow-prod.fluidtopics.net/Y196b6CKv2Ab5OnXnK_uRw#r_ScopedXMLDocument2GetNextNode_Object "Obtient le nœud après le nœud spécifié.") qui sont conçues pour parcourir le document sans l'analyser entièrement.
{#r_ScopedXMLDocument2GetNode_String__table_yhv_xp4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| xPath | Chaîne | xPath du nœud à obtenir. |
[Tableau 13. Paramètres]

{#r_ScopedXMLDocument2GetNode_String__table_yhv_xp4_1r} {#r_ScopedXMLDocument2GetNode_String__table_a3v_xp4_1r__entry__2}

| Type | Description |
|-|-|
| Code XML | Nœud XML actuel. |
[Tableau 14. Renvoie]

{#r_ScopedXMLDocument2GetNode_String__table_a3v_xp4_1r}  

    /*
     * Checks if given node indeed of given tag.
     * Params:
     *  tag - String, name of tag to check
     *  node - XMLNode, node in which to check for the tag
     * Returns:
     *  true, if tag is present
     *  false, otherwise
     */
    function isNodeOfTag (node, tag) {
      try {
        if (tag == node.getNodeName()) {
          gs.info("Given node belongs to tag " + tag);
          return true;
        }
      } catch (error) {
        gs.error("Given node might not belong to tag " + tag + ". Error while checking: " + error);
        return false;
      }
    }

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";

    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);

    var node = xmlDoc.getNode("/test/one/two"); // tag 'two' is present in this XML.
    isNodeOfTag(node, "two");

    var node = xmlDoc.getNode("/test/one/four"); // tag 'four' is not present in this XML.
    isNodeOfTag(node, "four");

Sortie :

    Given node belongs to tag two
    Given node might not belong to tag four. Error while checking: java.lang.NullPointerException

## XMLDocument2 dans le champ d'application : getNodeText(String xPath) {#ariaid-title10}

Obtient tous les nœuds enfants de texte à partir du nœud référencé dans le XPath spécifié.
{#r_ScopedXMLDocument2GetNodeText_String__table_dgq_2p4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| xPath | Chaîne | XPath du texte à obtenir. |
[Tableau 15. Paramètres]

{#r_ScopedXMLDocument2GetNodeText_String__table_dgq_2p4_1r} {#r_ScopedXMLDocument2GetNodeText_String__table_fgq_2p4_1r__entry__2}

| Type | Description |
|-|-|
| Chaîne | Envoyez un texte aux enfants dans XPath. |
[Tableau 16. Renvoie]

{#r_ScopedXMLDocument2GetNodeText_String__table_fgq_2p4_1r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString); 
    gs.info(xmlDoc.getNodeText("//two"));

Sortie :

    abcd1234

## XMLDocument2 inclus dans le périmètre : parseXML(Chaîne xmlDoc) {#ariaid-title11}

Analyse la chaîne XML et la charge dans l'objet XMLDocument2.
{#r_ScopedXMLDocument2ParseXML_String__table_rxk_n44_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| xmlDoc | Chaîne | Document à analyser. |
[Tableau 17. Paramètres]

{#r_ScopedXMLDocument2ParseXML_String__table_rxk_n44_1r} {#r_ScopedXMLDocument2ParseXML_String__table_scn_y2c_2r__entry__2}

| Type | Description |
|-|-|
| Booléen | Marqueur indiquant si le contenu a été analysé. |
[Tableau 18. Renvoie]

{#r_ScopedXMLDocument2ParseXML_String__table_scn_y2c_2r}  
Cet exemple analyse la chaîne xmlString et la charge dans l'objet xmlDocument2.

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString); 
    var rootNode = xmlDoc.getDocumentElement();

## XMLDocument2 inclus dans le champ d'application : setCurrentElement(élément XMLNnode) {#ariaid-title12}

Fait du nœud transmis en tant que paramètre le nœud actuel.
{#r_ScopedXMLDocument2SetCurrentElement_XMLNode__table_rbn_wt4_1r__entry__3}

| Nom | Type | Description |
|-|-|-|
| élément | Code XML | Le nœud d'élément à définir en tant que nœud actuel. |
[Tableau 19. Paramètres]

{#r_ScopedXMLDocument2SetCurrentElement_XMLNode__table_rbn_wt4_1r} {#r_ScopedXMLDocument2SetCurrentElement_XMLNode__table_pph_y2c_2r__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 20. Renvoie]

{#r_ScopedXMLDocument2SetCurrentElement_XMLNode__table_pph_y2c_2r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);
    //returns the root node of the document tree.
    var rootNode = xmlDoc.getDocumentElement(); //returns org.w3c.dom.Element
    // sets the root node as the current element
    xmlDoc.setCurrentElement(rootNode);

## XMLDocument2 inclus dans le champ d'application : setEnableCDATAReporting(booléen, activer) {#ariaid-title13}

Définit si les nœuds sont traités comme CDATA ou comme du texte normal après analyse. La génération de rapports CDATA est désactivée par défaut.
Cette méthode doit être appelée avec [XMLDocument2 inclus dans le périmètre : parseXML(Chaîne xmlDoc)](https://servicenow-prod.fluidtopics.net/Y196b6CKv2Ab5OnXnK_uRw#r_ScopedXMLDocument2ParseXML_String "Analyse la chaîne XML et la charge dans l’objet XMLDocument2.").

Voir aussi : [XMLNode inclus dans le champ d'application : isCDATANode()](https://servicenow-prod.fluidtopics.net/Q7N_E5ylUtrBVKsxGnGV9A#SXMLN_isCDATANode "Indique si le nœud CDATA est conservé en tant que nœud distinct.").
{#SXMLD_setEnableCDATAReporting_B__table_bk3_rjy_3x__entry__3}

| Nom | Type | Description |
|-|-|-|
| activer | Booléen | Marqueur indiquant s'il faut traiter les nœuds CDATA comme des nœuds CDATA ou des nœuds de texte standard. Valeurs valides : * vrai : activer la génération de rapports CDATA. * false : traiter les nœuds CDATA comme des nœuds de texte normal après analyse et concaténer avec le texte adjacent. {#SXMLD_setEnableCDATAReporting_B__ul_fj4_svh_lzb} Valeur par défaut : faux |
[Tableau 21. Paramètres]

{#SXMLD_setEnableCDATAReporting_B__table_bk3_rjy_3x} {#SXMLD_setEnableCDATAReporting_B__table_ck3_rjy_3x__entry__2}

| Type | Description |
|-|-|
| Aucune |   |
[Tableau 22. Renvoie]

{#SXMLD_setEnableCDATAReporting_B__table_ck3_rjy_3x}  
L'exemple suivant montre comment CDATA est analysé dans un élément avec la génération de rapports CDATA activée. Le résultat de content.getFirstChild() est un élément qui contient la valeur de texte une autre. Cet élément contient en interne les informations l'identifiant en tant que type CDATA. Le résultat de content.getLastChild() est un élément qui contient l'élément de valeur text. Cet élément contient les informations en interne sous forme de type de texte.

    var xmlString = "<test>" +
      "  <one>" +
      "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
      "    <two><![CDATA[another]]>element</two>" +
      "  </one>" +
      "  <number>1234</number>" 
      "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.setEnableCDATAReporting(true); // Enable CDATA reporting
    xmlDoc.parseXML(xmlString);
    var content = xmlDoc.getFirstNode('/test/one/two');
    gs.info(content.getFirstChild().getTextContent()); // prints "another"
    gs.info(content.getLastChild().getTextContent()); // prints "element"

Sortie :

    another
    element

Remarque :  
Si le reporting CDATA n'est pas activé dans l'exemple, l'ensemble de l'enfant concatène le CDATA en tant que texte avec le reste du texte (élément) dans chaque ligne comme suit :

    anotherelement
    anotherelement

## XMLDocument2 dans le champ d'application : setNamespaceAware(prenant en compte les booléens) {#ariaid-title14}

Lorsqu'il est défini sur true, l'objet XMLDocument2 traite le document avec des espaces de noms XML.
Si vous ne définissez pas cela, un document XML avec des espaces de noms ne sera pas énuméré correctement et une recherche XPath échouerait.
{#r_SXML-setNamespaceAware_B__table_rfn_p4t_3x__entry__3}

| Nom | Type | Description |
|-|-|-|
| aware (conscient) | Booléen | Si la valeur est vrai, l'objet XMLDocument2 traite le document avec des espaces de noms XML. |
[Tableau 23. Paramètres]

{#r_SXML-setNamespaceAware_B__table_rfn_p4t_3x} {#r_SXML-setNamespaceAware_B__table_sfn_p4t_3x__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 24. Renvoie]

{#r_SXML-setNamespaceAware_B__table_sfn_p4t_3x}

## XMLDocument2 dans le champ d'application : toString() {#ariaid-title15}

Renvoie une chaîne contenant le code XML.
{#r_ScopedXMLDocument2ToString__table_ody_nkr_2r__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucune |   |   |
[Tableau 25. Paramètres]

{#r_ScopedXMLDocument2ToString__table_ody_nkr_2r} {#r_ScopedXMLDocument2ToString__table_lvt_x54_1r__entry__2}

| Type | Description |
|-|-|
| Chaîne | Chaîne contenant le code XML. |
[Tableau 26. Renvoie]

{#r_ScopedXMLDocument2ToString__table_lvt_x54_1r}  

    var xmlString = "<test>" +
                    "  <one>" +
                    "    <two att=\"xxx\">abcd1234</two>" +
                    "    <three boo=\"yah\" att=\"yyy\">1234abcd</three>" +
                    "    <two>another</two>" +
                    "  </one>" +
                    "  <number>1234</number>" +
                    "</test>";
    var xmlDoc = new XMLDocument2();
    xmlDoc.parseXML(xmlString);
    gs.info(xmlDoc.toString());

Sortie : des sauts de ligne ont été ajoutés à la sortie pour plus de lisibilité.

    <?xml version="1.0" encoding="UTF-8"?>
    <test>  
    <one>    
    <two att="xxx">abcd1234</two>    
    <three att="yyy" boo="yah">1234abcd</three>    
    <two>another</two>  
    </one>  
    <number>1234</number>
    </test>


