Frictional Games Forum (read-only)
is there any reason why 'SetMessage' isn't working? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: is there any reason why 'SetMessage' isn't working? (/thread-14209.html)

Pages: 1 2


RE: is there any reason why 'SetMessage' isn't working? - Your Computer - 03-25-2012

A forward slash at the end of an opening XML element means you're telling the parser that it is an empty element (i.e. incapable of having children). So, having something like this is going to cause issues:

Code:
<CATEGORY Name="category name" />
    <Entry Name="entry name">Some text.</Entry>
</CATEGORY>

The category ended at the first line, so any child elements and text are not properly nested, and then there's the closing tag that is not related to any opening tag. So, the proper way to do it would be:

Code:
<CATEGORY Name="category name">
    <Entry Name="entry name">Some text.</Entry>
</CATEGORY>