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

HTML Discussion :

[HTML] Afficher un contenu XML en HTML


Sujet :

HTML

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    2
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 2
    Par défaut [HTML] Afficher un contenu XML en HTML
    Bonsoir,

    Je fais appel a vous car je n'arrive pas a affiché une partie de mon fichier XLM en HMTL. J'arrive à afficher les 4 premiers attributs (index, date,time, et type). Si quel qu'un peux jeter un coup d'oeil et me repondre je le remercie d'avance.

    Ci joint les 2 fichiers (le fichier XML ne peut etre modifier car il est generé par une application)

    Fichier XML : text.xml

    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
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <cdr_events>
    <event index="37" date="23 November 2006" time="12:12:59" type="participant_left">
    <conference unique_id="223022" name="Reunion Technique(1)">
    </conference>
    <endpoint_details ip_address="192.168.1.10" dn="2133" h323_alias="Hotline - VSX7000" configured_name="&lt;none&gt;">
    </endpoint_details>
    <participant participant_id="11">
    </participant>
    <call time_in_conference="31 sec" time_in_conference_in_minutes="1" disconnect_reason="participant ended call">
    </call>
    <media_from_endpoint resolution="480 x 272" video_codec="H.264" audio_codec="G.722" bandwidth="384000 bit/s">
    </media_from_endpoint>
    <media_to_endpoint resolution="704 x 576" video_codec="H.263" audio_codec="G.722" bandwidth="384000 bit/s">
    </media_to_endpoint>
    </event>
    </cdr_events>

    Fichier HTML : affiche.html

    Code HTML : 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
    <html>
    	<body>
    		<xml id="test" src="test.xml"/>
    		<table border="1" datasrc="#test">
    			<tr>
    				<td>Index</td>
    				<td>Date</td>
    				<td>Time</td>
    				<td>Type</td>
    				<td>Identifiant</td>
    				<td>Nom</td>
    				<td>Adresse ip</td>
    				<td>Dn</td>
    				<td>Alias</td>
    				<td>Nom de config</td>
    				<td>Id participant</td>
    				<td>time_in_conference</td>
    				<td>time_in_conference_in_minutes</td>
    				<td>disconnect_reason</td>
    				<td>media_from_endpoint resolution</td>
    				<td>media_from_endpoint video_codec</td>
    				<td>media_from_endpoint audio_codec</td>
    				<td>media_from_endpoint bandwidth</td>
    				<td>media_to_endpoint resolution</td>
    				<td>media_to_endpoint video_codec</td>
    				<td>media_to_endpoint audio_codec</td>
    				<td>media_to_endpoint bandwidth</td>
    			</tr>
    			<tr>
    				<td><span datafld="index"/></td>
    				<td><span datafld="date"/></td>
    				<td><span datafld="time"/></td>
    				<td><span datafld="type"/></td>
    				<td><span datafld="cdr_events.event.conference.unique_id"/></td>
    				<td><span datafld="event.name"/></td>
    				<td><span datafld="cdr_events.event.ip_address"/></td>
    				<td><span datafld="dn"/></td>
    				<td><span datafld="h323_alias"/></td>
    				<td><span datafld="configured_name"/></td>
    				<td><span datafld="participant_id"/></td>
    				<td><span datafld="time_in_conference"/></td>
    				<td><span datafld="time_in_conference_in_minutes"/></td>
    				<td><span datafld="disconnect_reason"/></td>
    				<td><span datafld="media_from_endpoint.resolution"/></td>
    				<td><span datafld="media_from_endpoint.video_codec"/></td>
    				<td><span datafld="media_from_endpoint.audio_codec"/></td>
    				<td><span datafld="media_from_endpoint.bandwidth"/></td>
    				<td><span datafld="media_to_endpoint.resolution"/></td>
    				<td><span datafld="media_to_endpoint.video_codec"/></td>
    				<td><span datafld="media_to_endpoint.audio_codec"/></td>
    				<td><span datafld="media_to_endpoint.bandwidth"/></td>
    			</tr>
    		</table>
    	</body>
    </html>

  2. #2
    Membre expérimenté
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    194
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 194
    Par défaut
    je ne connais la balise xml et je crois qu'elle n'existe pas en html
    par contre pour afficher du xml, tu peux le transformer en html en utilisant du xsl

    http://haypo.developpez.com/tutoriel/xml/xslt/

  3. #3
    Membre chevronné Avatar de nemo69500
    Profil pro
    Inscrit en
    Juin 2005
    Messages
    639
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2005
    Messages : 639
    Par défaut
    sinon au lieu d'utiliser du html , tu prend du xhtml 1.1, il me semble que c'est fais pour

  4. #4
    Membre Expert
    Avatar de trotters213
    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    2 571
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Gard (Languedoc Roussillon)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 2 571
    Par défaut

    utilise la balise <code> ou <pre> pour afficher tu texte tel quel (donc du XML entre autre)

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

Discussions similaires

  1. Afficher du contenu XML en Html ?
    Par Gaël-G dans le forum XML/XSL et SOAP
    Réponses: 1
    Dernier message: 04/08/2014, 10h14
  2. [XML] afficher le contenu xml vers un tableau en php
    Par tomecruzz dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 18/05/2010, 13h37
  3. Problème pour afficher le contenu d'un fichier xml en html
    Par raphael74 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 21
    Dernier message: 13/08/2009, 16h17
  4. afficher un contenu xml à partir d'une servlet
    Par air75 dans le forum Servlets/JSP
    Réponses: 8
    Dernier message: 10/06/2009, 11h21
  5. [HTML] Afficher un texte au format HTML dans une textarea
    Par Akutabi dans le forum Balisage (X)HTML et validation W3C
    Réponses: 22
    Dernier message: 12/12/2007, 14h50

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