Thread: XML linefeed (text formatting)
-
October 14th, 2006, 06:49 #1
- Join Date
- Jul 2006
- Location
- Taichung, TAIWAN
- Posts
- 50
XML linefeed (text formatting)
I'm new to XML but a veteran to HTML. I can't seem to find a way to duplicate the linefeed <br> from HTML...
Code:<p><b><i>small armor:</i></b><br> <li><i>cost -- 75% normal price</i></li> <li><i>weight -- 50% of the listed amount</i></li></p>
So is there any way in XML to have a single line followed by a list without a full blank line?
-
October 14th, 2006, 07:14 #2
- Join Date
- Jun 2006
- Location
- San Diego, CA
- Posts
- 45
Not sure if this helps, but:
HTML code is, AFAIK, only allowed in FormattedText nodes. If you use the HTML code script in any other node type the XML Dom parser will assume you are working on an XML node (hence many forums using closed brackets vs. open brackets to indicate text modes - i.e. italic, bold and underlined - for example).
I haven't come across any line break in any of the xml files I have access to, however you could implement the code using tables instead (which seems to be the SOP for FG HTML text)...
-
October 14th, 2006, 07:17 #3
- Join Date
- Jul 2006
- Location
- Taichung, TAIWAN
- Posts
- 50
Tables, indeed!
I just decided to throw it into a table which has the desired effect. Heh, thanks for the reply
-
October 14th, 2006, 07:29 #4
- Join Date
- Jul 2006
- Location
- Taichung, TAIWAN
- Posts
- 50
Still not quite perfect...
Using a table in the code below, there's no blank line for the <tr><td> </td></tr>. I tried using <p> tags, separating the info into two tables and both of these methods together -- none of them worked. Using <p> tags seems to had huge amounts of space (one at the beginning of the tag and one at the end -- or perhaps the <table> tag is also adding one at the beginning).
Code:<table><tr><td><b><i>small armor:</i></b></td></tr> <tr><td><li><i>cost -- 75% normal price</i></li><li><i>weight -- 50% of the listed amount</i></li></td></tr> <tr><td> </td></tr> <tr><td><b><i>tiny armor:</i></b></td></tr> <tr><td><li><i>cost -- 50% normal price</i></li> <li><i>weight -- 10% of the listed amount</i></li> <li><i>defensive value is halved (rounded down)</i></li></td></tr></table>
nevermind -- fixed it
Apparently, the <li> tags mess up FG's ability to calculate # of lines... do each <li> has to be put inside its own <tr><td>***</td></tr> tags otherwise later text with overlap... strange!Last edited by Zakarius; October 14th, 2006 at 07:50.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks