Line Break en XML

  • Hacker007
  • Proficient
  • Proficient
  • Avatar de l’utilisateur
  • Inscription: Avr 07, 2004
  • Messages: 371
  • Loc: Riverside, CA
  • Status: Offline

Message Juin 8th, 2004, 9:34 am

Im en utilisant XML pour afficher les nouvelles sur un site, mais ne peut obtenir un espace entre les articles, si vous pourriez nous aider ce serait super. Voici ce que im en utilisant

HTML
Code: [ Select ]
<html>
<head>
<style>
#posthead {background-color:navy; color: white; text-align: center; border: 2px solid black;}
#postbody {background-color:none; color: black; text-align: left ; border: 1px solid black; border-top:  0px solid black;}
</style>
</head>
<body>
<xml
src="news.xml"
id="xmldso"
async="false">
</xml>

<table datasrc="#xmldso" width="525" border="0" cell-spacing="0" cell-padding="0">
<tr>
<td id="posthead"><span datafld="TITLE"></span></td>
</tr>
<tr>
<td id="postbody"><span datafld="POST"></span></td>
</tr>
</table>

</body>
</html>
  1. <html>
  2. <head>
  3. <style>
  4. #posthead {background-color:navy; color: white; text-align: center; border: 2px solid black;}
  5. #postbody {background-color:none; color: black; text-align: left ; border: 1px solid black; border-top:  0px solid black;}
  6. </style>
  7. </head>
  8. <body>
  9. <xml
  10. src="news.xml"
  11. id="xmldso"
  12. async="false">
  13. </xml>
  14. <table datasrc="#xmldso" width="525" border="0" cell-spacing="0" cell-padding="0">
  15. <tr>
  16. <td id="posthead"><span datafld="TITLE"></span></td>
  17. </tr>
  18. <tr>
  19. <td id="postbody"><span datafld="POST"></span></td>
  20. </tr>
  21. </table>
  22. </body>
  23. </html>


XML
Code: [ Select ]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v4.2 -->
<CATALOG>
    <NEWS>
        <TITLE>Article Name</TITLE>
        <POST>Article Body</POST>
    </NEWS>
    
    <NEWS>
        <TITLE>Article Name 2</TITLE>
        <POST>Article Body 2</POST>
    </NEWS>
</CATALOG>
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!-- Edited with XML Spy v4.2 -->
  3. <CATALOG>
  4.     <NEWS>
  5.         <TITLE>Article Name</TITLE>
  6.         <POST>Article Body</POST>
  7.     </NEWS>
  8.     
  9.     <NEWS>
  10.         <TITLE>Article Name 2</TITLE>
  11.         <POST>Article Body 2</POST>
  12.     </NEWS>
  13. </CATALOG>


J'ai besoin d'un espace BETWEN chaque tableau comme <* br / *>, mais cela ne marchera pas pour moi :oops:
  • Anonymous
  • Bot
  • No Avatar
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Juin 8th, 2004, 9:34 am

  • digitalMedia
  • a.k.a. dM
  • Genius
  • Avatar de l’utilisateur
  • Inscription: Déc 29, 2003
  • Messages: 5169
  • Loc: SC-USA
  • Status: Offline

Message Juin 8th, 2004, 10:28 am

Avez-vous essayé d'utiliser une marge sur le postbody "" définitions?

Code: [ Select ]
#postbody{color:#000;text-align:left;border:1px solid #000; border-top:0px solid #000;margin-bottom:10px;}


Aussi, si vous allez avoir plusieurs instances de la table cet affichage que vous voudrez utiliser des classes au lieu d'IDS:

Code: [ Select ]
.postbody{color:#000;text-align:left;border:1px solid #000; border-top:0px solid #000;margin-bottom:10px;}


<td class="postbody"></td>
  1. .postbody{color:#000;text-align:left;border:1px solid #000; border-top:0px solid #000;margin-bottom:10px;}
  2. <td class="postbody"></td>
- dM
  • Hacker007
  • Proficient
  • Proficient
  • Avatar de l’utilisateur
  • Inscription: Avr 07, 2004
  • Messages: 371
  • Loc: Riverside, CA
  • Status: Offline

Message Juin 8th, 2004, 11:47 am

Je vous remercie de l'aide, je vais essayer :wink:
La marge chose.... Man I doit avoir figuré qui travaillent...Devinez, je ne pense pas assez dur, je vous remercie bien. Et je vais changer d'ID de classe aussi. :lol:
  • Shikoku
  • Newbie
  • Newbie
  • No Avatar
  • Inscription: Juin 07, 2004
  • Messages: 14
  • Status: Offline

Message Juin 8th, 2004, 2:33 pm

ainsi
Code: [ Select ]
<br>
ne fonctionnera pas et vous ne pouvez pas la touche Maj enfoncée entrer? thats homme gotta suck!

Afficher de l'information

  • Total des messages de ce sujet: 4 messages
  • Utilisateurs parcourant ce forum: roelof et 140 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC