-
XML new line?
XML new line?
Hi all,
I have a simple vertical nav menu by attaching MC's using an XML file. The names on the MC's come from the name attribute in the XML file, so the names read 'First Button', 'Second Button' etc., is it possible to put a line break in so it would read
First
Button
Second
Button etc.
instead of
First Button
Second Button
XML file
Code:
<cart>
<btn name="First Button" color="0xffcc00" />
<btn name="Second Button" color="0xffcc00" />
<btn name="Third Button" color="0xffcc00" />
<btn name="Fifth Button" color="0xffcc00" />
<btn name="Sixth Button" color="0xffcc00" />
</cart>
-
put the html for a line break in and render the text on the menu as HTML.
---
Thinking outside of the box will get you fired if the "box" is strict budget.
-
That's not necessary to render text as HTML.
Just add in your XML text the code & # 10 ; (remove the spaces)
wherever you want a single line break, like this:
Code:
<cart>
<btn name="First& # 10 ;Button" color="0xffcc00" />
<btn name="Second& # 10 ;Button" color="0xffcc00" />
<btn name="Third& # 10 ;Button" color="0xffcc00" />
<btn name="Fifth& # 10 ;Button" color="0xffcc00" />
<btn name="Sixth& # 10 ;Button" color="0xffcc00" />
</cart>
PS: I needed to add the spaces otherwise the HTML renderer for this page was interpreting it as the line break - LOL.
-
Thanks yanmoura thats works perfect
-
You welcome!
-
yanmoura, thank you very much for this hint, I was looking for this everywhere on the net and couldn't find it.
Thanks again.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|