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

Windows Forms Discussion :

Changement de valeur apres la transformation d'un XML


Sujet :

Windows Forms

  1. #1
    Nouveau membre du Club
    Inscrit en
    Janvier 2009
    Messages
    138
    Détails du profil
    Informations forums :
    Inscription : Janvier 2009
    Messages : 138
    Points : 37
    Points
    37
    Par défaut Changement de valeur apres la transformation d'un XML
    j'ai deux fichier XMl f1 et f2 qui ont par exemple la structure suivante :

    f1 :

    Code xml :

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <rocords>
    </rocord>
     
    <rocord_id>1</rocord_id>
     <rocord_Descreption><![CDATA[<font face="Arial" size="2" color="#003366"><span><span>A pliable adhesive  fire cement of putty-like consistency available in 5OOg and 1 kg containers<br /><br /></span></span></font><ul><li><font face="Arial" size="2" color="#003366"><span><span>Haz Class       Irritant  </span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Ensure surface is clean and free from contamination.</span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Use  straight from the tub, apply with a trowel, knife, etc and work well into the area</span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Hardens by air drying and operational heat which improves and strengthens seals and joints.  Gently apply initial heat to the fire cement over a 3-4 hour period, and then gradually increase to full operating temperature. </span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Is water based and non-toxic, withstands heat up to 1400'C (2550'F)</span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>This product is specially formulated and recommended by leading industrial and domestic heating appliance manufacturers throughout the world.</span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Ideal for installation and maintenance of boilers, fires. flues, stoves. heating installations, ranges etc.  </span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Fill and smooth any fine cracks if necessary.  </span></span></font></li></ul><ul><li><font face="Arial" size="2" color="#003366"><span><span>Not suitable for large repair to masonary or rendering fireplaces. For this application see HeatProod Screed here </span></span></font></li></ul><font face="Arial" size="2" color="#003366"><span> </span></font><p>]]></rocord_Description>
     
    </rocord>
    </rocords>


    f2 :

    Code xml :

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <enregistrements>
    </enregistrement>
     
    <enre_numero></enre_numero>
    <enre_Des></enre_Des>
     
    </enregistrement>
    </enregistrements>



    Quand je fais la transfoprmation de F1 en F2 avac le fichier xsl suivant :
    Code xml : 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
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     
        <xsl:template match="/">
          <enregistrements>
            <xsl:for-each select="rocords/rocord">
              <enregistrement>
                <enre_numero><xsl:value-of select="rocord_id"/></enre_numero>
                <enre_Description><xsl:value-of select="rocord_Des"/></enre_Description>
              </enregistrement>
            </xsl:for-each>
          </enregistrements>
        </xsl:template>
     
    </xsl:stylesheet>




    il change la valeur de la balise <enre_Des></enre_Des>
    en ceci :

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
     <enre_Des>&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;A pliable adhesive  fire cement of putty-like consistency available in 5OOg and 1 kg containers&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Haz Class       Irritant  &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Ensure surface is clean and free from contamination.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Use  straight from the tub, apply with a trowel, knife, etc and work well into the area&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Hardens by air drying and operational heat which improves and strengthens seals and joints.  Gently apply initial heat to the fire cement over a 3-4 hour period, and then gradually increase to full operating temperature. &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Is water based and non-toxic, withstands heat up to 1400'C (2550'F)&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;This product is specially formulated and recommended by leading industrial and domestic heating appliance manufacturers throughout the world.&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Ideal for installation and maintenance of boilers, fires. flues, stoves. heating installations, ranges etc.  &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Fill and smooth any fine cracks if necessary.  &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt;&lt;span&gt;Not suitable for large repair to masonary or rendering fireplaces. For this application see HeatProod Screed here &lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font face="Arial" size="2" color="#003366"&gt;&lt;span&gt; &lt;/span&gt;&lt;/font&gt;&lt;p&gt;</enre_Des>


    ce que je veux savoir c'est pourquoi seule la valeur de cette balise qui est changé?est ce que c'est normal?
    est ce qu'il ya une solution pour que je garde les données de la balises sans changement.

    Merci

  2. #2
    Nouveau membre du Club
    Inscrit en
    Janvier 2009
    Messages
    138
    Détails du profil
    Informations forums :
    Inscription : Janvier 2009
    Messages : 138
    Points : 37
    Points
    37
    Par défaut
    a vrai dire je pense qu'il remplace <> par &lt;

    quelqu'un peut il m'aider?

  3. #3
    Rédacteur/Modérateur


    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2004
    Messages
    19 875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Février 2004
    Messages : 19 875
    Points : 39 749
    Points
    39 749
    Par défaut
    A priori c'est au niveau du XSL que ça se joue... je suis pas expert en la matière, donc je peux pas t'en dire plus, mais sur le forum XSL tu devrais trouver une réponse :
    http://www.developpez.net/forums/f46...sl-xslt-xpath/

  4. #4
    Nouveau membre du Club
    Inscrit en
    Janvier 2009
    Messages
    138
    Détails du profil
    Informations forums :
    Inscription : Janvier 2009
    Messages : 138
    Points : 37
    Points
    37
    Par défaut
    Ok merci

Discussions similaires

  1. Filtrage apres un changement de valeur dans la cellule
    Par dragondumond dans le forum VB.NET
    Réponses: 2
    Dernier message: 19/07/2013, 10h02
  2. Réponses: 0
    Dernier message: 18/04/2011, 17h53
  3. Changement de valeur apres la transformation d'un XML
    Par Ya7yaKech dans le forum XSL/XSLT/XPATH
    Réponses: 4
    Dernier message: 19/01/2009, 22h47
  4. valeur nd dans transformer après ventilation
    Par laaboubi dans le forum Cognos
    Réponses: 0
    Dernier message: 04/11/2008, 17h46
  5. Charger Macro apres changement de valeur d'une cellule
    Par jackfred dans le forum Macros et VBA Excel
    Réponses: 3
    Dernier message: 04/07/2007, 14h51

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