IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Format d'échange (XML, JSON...) Java Discussion :

An attempt was made to insert a node where it is not permitted.


Sujet :

Format d'échange (XML, JSON...) Java

  1. #1
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut An attempt was made to insert a node where it is not permitted.
    Bonsoir,
    je veux créer un fichier xml nmapResult.xml de la forme suivante:
    <?xmlversion="1.0"encoding="UTF-8"?>
    <site>
    <Information>
    <Ip>192.168.229.128</Ip>
    <OS>Running: Microsoft Windows XP</OS
    <ports>
    <port>80/tcp open http Apache httpd 2.2.21 ((Win32) PHP/5.3.10)</port>
    <port>135/tcp open msrpc Microsoft Windows RPC</port>
    <port>139/tcp open netbios-ssn</port>
    <port>3306/tcp open mysql MySQL</port>
    </ports>
    <Cms>Aucune utilisation de CMS</Cms>
    </information>
    </site>
    pour ce faire, j'ai développé ce code
    public class createxml {

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    public static void main(String[] args) {
     
     
            List<String> rs = new ArrayList<>();
     
     
            String[]cmd = new String[4];
     
            cmd[0] = "nmap";
            cmd[1] = "-sS";
     
            cmd[2] = "-O";
     
       cmd[3] = "192.168.1.1/dvwa/login.php";
     
            //cmd[4] = "-oX";
     
      // cmd[5] = "scan.xml";
     
            Runtime r = Runtime.getRuntime();
     
          Process p = null;
     
          try {
     
        p = r.exec(cmd);
     
           } catch (IOException ex) {
     
           //  Logger.getLogger(ScannerForm.class.getName()).log(Level.SEVERE, null, ex);
     
           }
    BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream()));
     
            String line = "";
     
       final List<String> ports = new ArrayList<String>();
     
           final List<String> oss = new ArrayList<String>();
     
           final List<String> Url = new ArrayList<String>();
     
          String mac = "";
     
     
     
            try {
     
     
     
               while ((line = bfr.readLine()) != null){
     
                  if (line.contains("/tcp") || line.contains("/Http")) {
     
                      ports.add(line);
     
                 }
     
      if (line.contains("MAC")) {
     
     
                      mac = line;
     
              }
     
     if (line.contains("OS")) {
     
     
                      oss.add(line);
     
                   }
     
     if (line.contains("myrouter")) {
     
     
                      // int l=line.length();
     
                       line= line.substring(36,line.length()-1);
     
     
     
                        Url.add(line);
     
                   }
                }
         }catch (IOException ex) {
     
     
           }
            String script = "/pentest/web/blindelephant/src/blindelephant/BlindElephant.py";
     
           String[]cmd1 = new String[4];
     
          cmd1[0] = "python";
     
         cmd1[1] = script;
     
         cmd1[2] = "192.168.1.1/dvwa/login.php";
     
         cmd1[3] = "guess";
     
          Runtime r1 = Runtime.getRuntime();
     
            Process p1 = null;
            try {
     
              p1 = r1.exec(cmd1);
     
      } catch (IOException ex) {
     
     
            }
            BufferedReader bfr1 = new BufferedReader(new InputStreamReader(p1.getInputStream()));
     
        //BufferedReader bfr2 =  new BufferedReader(bfr1, bfr);
     
         String line1 = "";
     
          // String pro = "";
     
            String msg = "";
     
         final List<String> pro = new ArrayList<String>();
     
         try {
                while ((line1 = bfr1.readLine()) != null){
     
                 if (line1.contains("probing")) {
     
                 msg = "Aucune identification CMS";
     
                        pro.add(msg);
     
     }
                }
     
            } catch (IOException ex) {
     
     
            }
            try {
                DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
     
             DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
     
           Document doc = docBuilder.newDocument();
     
     Element rootElement = doc.createElement("site");
     
              doc.appendChild(rootElement);
     
     
               // Element adresse=doc.createElement("Addresse");
     
              Element information = doc.createElement("information");
     
              if (!Url.isEmpty()) {
     
                Element url = doc.createElement("url");
     
                url.appendChild(doc.createTextNode(Url.get(0)));
     
                url.appendChild(url);
     
              }  
     
     if (!oss.isEmpty()) {
     
              Element os = doc.createElement("os");
     
              os.appendChild(doc.createTextNode(oss.get(0)));
     
               information.appendChild(os);
     
               }
     
    if (!pro.isEmpty()) {
     
      Element cms = doc.createElement("cms");
     
                cms.appendChild(doc.createTextNode(msg));
     
     
    information.appendChild(cms);
     
               }
     
     
             Element listOfports = doc.createElement("ports");
     
            Element pr;
     
          for (String port : ports) {
     
          pr = doc.createElement("port");
     
          pr.appendChild(doc.createTextNode(port));
     
          listOfports.appendChild(pr);
     
        }
                information.appendChild(listOfports);
     
     
                rootElement.appendChild(information);
     
               // write the content into xml file
     
              TransformerFactory transformerFactory = TransformerFactory.newInstance();
     
                Transformer transformer = transformerFactory.newTransformer();
     
                DOMSource source = new DOMSource(doc);
     
             StreamResult result = new StreamResult(new File("nmapResult.xml"));
     
               transformer.transform(source, result);
     
        } catch (ParserConfigurationException pce) {
     
            pce.printStackTrace();
     
     } catch (TransformerException tfe) {
     
               tfe.printStackTrace();
     
         }
        }
    }
    ça fonctionnait très bien, mais quand j'ai ajouté ces lignes:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    if (!pro.isEmpty()) {
     
      Element cms = doc.createElement("cms");
     
                cms.appendChild(doc.createTextNode(msg));
     
     
    information.appendChild(cms);
     
               }
    j'obtiens l'erreur suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    Exception in thread "main" org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 
     
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
     
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
    Pouvez vous m'aidez SVP??

  2. #2
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut
    pas de réponse??

  3. #3
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Tu peux nous donner ta stack trace complète, ainsi que la ligne de code qui correpond à l'erreur de la stacktrace?

  4. #4
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut
    Voici la sortie d'erreur complète
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    Exception in thread "main" org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 
     
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
     
    	at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:379)
     
    l.dom.ParentNode.insertBefore(ParentNode.java:288)
     
    	at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:238)
     
    	at testtt.createxml.main(createxml.java:137)
     
    Java Result: 1
    Voici tout le code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    /*
     * To change this license header,
     choose License Headers in Project Properties.
     
    * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
     
     
    package testtt;
     
    import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary;
     
    import java.io.BufferedReader;
     
    import java.io.FileWriter;
     
    import java.io.IOException;
     
    import java.io.InputStreamReader;
     
    import java.io.PrintWriter;
     
    import java.util.logging.Level;
     
    import java.util.logging.Logger;
     
    import java.io.File;
     
    import java.util.ArrayList;
     
    import java.util.List;
    import javaapplication1.ScannerForm;
     
    import javax.xml.parsers.DocumentBuilder;
     
    import javax.xml.parsers.DocumentBuilderFactory;
     
    import javax.xml.parsers.ParserConfigurationException;
     
    import javax.xml.transform.Transformer;
     
    import javax.xml.transform.TransformerException;
     
    import javax.xml.transform.TransformerFactory;
     
    import javax.xml.transform.dom.DOMSource;
     
    import javax.xml.transform.stream.StreamResult;
     
     
    import org.w3c.dom.Attr;
     
    import org.w3c.dom.Document;
     
    import org.w3c.dom.Element;
     
    import org.w3c.dom.Text;
    import sun.security.util.Length;
     
     
    /**
     *
     * @author root
     */
     
    public class createxml {
     
       public static void main(String[] args) {
     
     
            List<String> rs = new ArrayList<>();
     
     
            String[]cmd = new String[4];
     
            cmd[0] = "nmap";
            cmd[1] = "-sS";
     
            cmd[2] = "-O";
     
       cmd[3] = "192.168.1.1/dvwa/login.php";
     
            //cmd[4] = "-oX";
     
      // cmd[5] = "scan.xml";
     
            Runtime r = Runtime.getRuntime();
     
          Process p = null;
     
          try {
     
        p = r.exec(cmd);
     
           } catch (IOException ex) {
     
           //  Logger.getLogger(ScannerForm.class.getName()).log(Level.SEVERE, null, ex);
     
           }
    BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream()));
     
            String line = "";
     
       final List<String> ports = new ArrayList<String>();
     
           final List<String> oss = new ArrayList<String>();
     
           final List<String> Url = new ArrayList<String>();
     
          String mac = "";
     
     
     
            try {
     
     
     
               while ((line = bfr.readLine()) != null){
     
                  if (line.contains("/tcp") || line.contains("/Http")) {
     
                      ports.add(line);
     
                 }
     
      if (line.contains("MAC")) {
     
     
                      mac = line;
     
              }
     
     if (line.contains("OS")) {
     
     
                      oss.add(line);
     
                   }
     
     if (line.contains("myrouter")) {
     
     
                      // int l=line.length();
     
                       line= line.substring(36,line.length()-1);
     
     
     
                        Url.add(line);
     
                   }
                }
         }catch (IOException ex) {
     
     
           }
            String script = "/pentest/web/blindelephant/src/blindelephant/BlindElephant.py";
     
           String[]cmd1 = new String[4];
     
          cmd1[0] = "python";
     
         cmd1[1] = script;
     
         cmd1[2] = "192.168.1.1/dvwa/login.php";
     
         cmd1[3] = "guess";
     
          Runtime r1 = Runtime.getRuntime();
     
            Process p1 = null;
            try {
     
              p1 = r1.exec(cmd1);
     
      } catch (IOException ex) {
     
     
            }
            BufferedReader bfr1 = new BufferedReader(new InputStreamReader(p1.getInputStream()));
     
        //BufferedReader bfr2 =  new BufferedReader(bfr1, bfr);
     
         String line1 = "";
     
          // String pro = "";
     
            String msg = "";
     
         final List<String> pro = new ArrayList<String>();
     
         try {
                while ((line1 = bfr1.readLine()) != null){
     
                 if (line1.contains("probing")) {
     
                 msg = "Aucune identification CMS";
     
                        pro.add(msg);
     
     }
                }
     
            } catch (IOException ex) {
     
     
            }
            try {
                DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
     
             DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
     
           Document doc = docBuilder.newDocument();
     
     Element rootElement = doc.createElement("site");
     
              doc.appendChild(rootElement);
     
     
               // Element adresse=doc.createElement("Addresse");
     
              Element information = doc.createElement("information");
     
              if (!Url.isEmpty()) {
     
                Element url = doc.createElement("url");
     
                url.appendChild(doc.createTextNode(Url.get(0)));
     
                url.appendChild(url);
     
              }  
     
     if (!oss.isEmpty()) {
     
              Element os = doc.createElement("os");
     
              os.appendChild(doc.createTextNode(oss.get(0)));
     
               information.appendChild(os);
     
               }
     
    if (!pro.isEmpty()) {
     
      Element cms = doc.createElement("cms");
     
                cms.appendChild(doc.createTextNode(msg));
     
     
    information.appendChild(cms);
                }
     
     
             Element listOfports = doc.createElement("ports");
     
            Element pr;
     
          for (String port : ports) {
     
          pr = doc.createElement("port");
     
          pr.appendChild(doc.createTextNode(port));
     
          listOfports.appendChild(pr);
     
        }
                information.appendChild(listOfports);
     
     
                rootElement.appendChild(information);
     
               // write the content into xml file
     
              TransformerFactory transformerFactory = TransformerFactory.newInstance();
     
                Transformer transformer = transformerFactory.newTransformer();
     
                DOMSource source = new DOMSource(doc);
     
             StreamResult result = new StreamResult(new File("nmapResult.xml"));
     
               transformer.transform(source, result);
     
        } catch (ParserConfigurationException pce) {
     
            pce.printStackTrace();
     
     } catch (TransformerException tfe) {
     
               tfe.printStackTrace();
     
         }
        }
    }

  5. #5
    Modérateur

    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    12 551
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 12 551
    Points : 21 607
    Points
    21 607
    Par défaut
    Et donc ? La ligne 137 c'est quoi ?
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  6. #6
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut
    je vous joint deux imprimes écran de la sortie d'erreur et la ligne correspondante Nom : erreur.png
Affichages : 1501
Taille : 256,0 Ko

    Nom : partie-code.png
Affichages : 1561
Taille : 258,9 Ko

  7. #7
    Modérateur
    Avatar de joel.drigo
    Homme Profil pro
    Ingénieur R&D - Développeur Java
    Inscrit en
    Septembre 2009
    Messages
    12 430
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Ingénieur R&D - Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2009
    Messages : 12 430
    Points : 29 131
    Points
    29 131
    Billets dans le blog
    2
    Par défaut
    Salut,

    En faisant :

    tu ajoutes l'élément référencé par url à lui-même ! Tu imagines bien que cela n'est pas possible, sinon ça donnerait une sorte de XML infini...
    L'expression "ça marche pas" ne veut rien dire. Indiquez l'erreur, et/ou les comportements attendus et obtenus, et donnez un Exemple Complet Minimal qui permet de reproduire le problème.
    La plupart des réponses à vos questions sont déjà dans les FAQs ou les Tutoriels, ou peut-être dans une autre discussion : utilisez la recherche interne.
    Des questions sur Java : consultez le Forum Java. Des questions sur l'EDI Eclipse ou la plateforme Eclipse RCP : consultez le Forum Eclipse.
    Une question correctement posée et rédigée et vous aurez plus de chances de réponses adaptées et rapides.
    N'oubliez pas de mettre vos extraits de code entre balises CODE (Voir Mode d'emploi de l'éditeur de messages).
    Nouveau sur le forum ? Consultez Les Règles du Club.

  8. #8
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut
    salut,

    Oui vous avez bien raison, j'ai corrigé la ligne et ça fonctionnait très bien. Maintenant, je veux ajouter la ligne :
    <Cms>Aucune utilisation de CMS</Cms>
    j'ai ajouté ces lignes dans mon code

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     String msg = "";
     
         final List<String> pro = new ArrayList<String>();
     
         try {
                while ((line1 = bfr1.readLine()) != null){
     
                 if (line1.contains("probing")) {
     
                 msg = "Aucune identification CMS";
     
                        pro.add(msg);
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    if (!pro.isEmpty()) {
     
      Element cms = doc.createElement("cms");
     
       cms.appendChild(doc.createTextNode(msg));
     
    information.appendChild(cms);
    mais en affichant le fichier xml, j'obtiens pas la ligne correspondante!!

  9. #9
    Modérateur

    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    12 551
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 12 551
    Points : 21 607
    Points
    21 607
    Par défaut
    Peut-être que tu entres juste pas dans le if ?
    N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  10. #10
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Est-ce que tu entre dans le if? J'ai l'impression que non.

  11. #11
    Nouveau membre du Club
    Femme Profil pro
    Inscrit en
    Janvier 2014
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Janvier 2014
    Messages : 36
    Points : 26
    Points
    26
    Par défaut
    c'est bon, j'ai réglé le programme,j'ai éliminé le if de la deuxième partie du code et ca devient:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    msg="Aucune identification du cms";
    Element cms = doc.createElement("cms");
    cms.appendChild(doc.createTextNode(msg));
    information.appendChild(cms);

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 20/01/2013, 07h10
  2. [AC-2007] Pb pour formuler mon INSERT avec un WHERE
    Par tibofo dans le forum Requêtes et SQL.
    Réponses: 4
    Dernier message: 01/12/2010, 09h17
  3. [AC-2003] Insert into avec where
    Par Walid(Tun) dans le forum VBA Access
    Réponses: 3
    Dernier message: 24/09/2010, 08h17
  4. [MySQL] INSERT INTO et WHERE
    Par Albat_r dans le forum PHP & Base de données
    Réponses: 3
    Dernier message: 24/01/2009, 18h53
  5. insert + la clause where
    Par cari dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 02/06/2006, 08h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo