
August 12th, 2004, 07:08 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by dashley6789 I was just wondering what people consider as the best way to represent a simple document in XML. Does each paragraph get it's own tag? What i'm trying to do is read in text but maintain the paragraphs so that it will look right when I print it out. I saw some people placing <br/> within the XML but this seems like a bad practice. |
XML is a good format for specifying the structure of your data, unlike HTML which specifies how your data should look. It is a good idea to structure your xml document in a manner that suits it's content. For example, if it was a book you may have root <book> tag followed by an <author> tag, and so on.
So you may be wondering, how do I make it look a little more interesting? Well, the good thing about XML is that it is very simple to convert into other formats. In fact, there is an XML language called XSL (sometimes called XSLT), which you can use to do this. It is very common to find an XML file being converted into HTML using an XSL document. Have a google around and see what you can find.
|