EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 11-17-2007, 03:44 PM
ryokousha ryokousha is offline
A Young Mystail Rat
 
Join Date: Jul 2007
Server: Antonia Bayle
Posts: 2
Default Newlines in XML

I've seen several threads mentioning that the XML parser reads from top to bottom and right to left. To me that top to bottom part is most interesting since it seems to imply I can put newlines in my xml file to make it easier to read (rather than having every element property be all on one line)
ex: rather than
<button localtext="click me" MyElem="first" MySecond="second" Location="250,30" Name="mybutton" ScrollExtent="42,42" Size="42,42">mybutton</button>

having
<button localtext="click me"
MyElem="first"
MySecond="second"
Location="250,30" Name="mybutton" ScrollExtent="42,42" Size="42,42">
mybutton</button>


However, whenever I have any xml file with newlines like those in it - my game crashes immediately upon loading the UI.

Am I misunderstanding the the top-to-bottom reading? Or are there special end of line characters I need to be inserting (or not inserting) - I use Emacs under Windows for my xml editing. I've tried manually adding some ^M characters at the end with no luck. I've also tried editing in Notepad with the same results.

Putting all the property elements on a single line works but is incredibly annoying to edit.

Thanks
Reply With Quote
  #2  
Unread 11-17-2007, 03:49 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

In my experience, new lines are ok inside of properties, but NOT ok inside of a tag.

For example, this is ok:

<Button localtext="this is ok
"></button>

This is NOT ok:
<Button localtext="this is not ok"
></button>

Notice that in the first example, the newline occurs inside the localtext properties, but in the second line its inside the button but NOT inside a property.

Also, keep in mind this is just what i've noticed in my tinkering.
Reply With Quote
  #3  
Unread 11-17-2007, 03:57 PM
ryokousha ryokousha is offline
A Young Mystail Rat
 
Join Date: Jul 2007
Server: Antonia Bayle
Posts: 2
Default

Ah ok thank you.

I was trying to play with the conditionals (as referenced in the Concatenate thread and they showed some properties on multiple lines. Was confusing when I couldn't get it to work.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:40 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI