BYU Home page BRIGHAM YOUNG UNIVERSITY  
Search BYU 
ECEn XML Web Templates: Troubleshooting



If you’ve run into trouble with ECEn XML Web Templates, browse through some of these problems to see if they might fit your situation. If not, please let the
ECEn Web Team know, and we’ll help you resolve the problem.

General Problem AreaSymptomsSolution
Broken XML

Finding mis-matched tags
I see the error page:

An error was encountered while parsing the XML file…

Opening and ending tag mismatch
Usually this means you’ve forgotten or misspelled a closing tag. The line numbers on the error message are usually quite helpful in helping you find the missing tag.

To fix the problem:

Find the missing closing tag.

For example, if you see that your <page> and <content> tags are complaining, it should tip you off that you are missing a closing <section> tag somewhere.

But I have so many sections! Using the fact that the <page> and <content> tags are complaining, you know you are missing a <section> tag which is a child of your <content> tag and you don’t need to worry about any of the sections that are children of other sections.

What is a “child tag” in XML? For example, if I create a <section> tag and place a <text> tag within it, then the <text> tag is a child tag of the <section> tag.

Closing <text> tag and <section> tags are the most often forgotten. If you use the free XRAY XML editor, it will notify you as you type your XML file that a tag is missing.

It can also indicate a misspelled closing tag. Remember that XML is case sensitive, so using an uppercase closing tag for a lowercase starting tag would behave just as if the closing tag were missing or misspelled.
Broken XML

‘<’ and ‘&’ run amuk
I see the error page:

An error was encountered while parsing the XML file…

xmlParseEntityRef: no name
Usually this means that you have a stray ‘&’ in your document. This character has special meaning for XML which implies that XML does not treat ‘&’ like a normal text character.

To fix the problem:

Replace ‘&’ with ‘&amp;’ (meaning ampersand).
Broken XML

‘<’ and ‘&’ run amuk
I see the error page:

An error was encountered while parsing the XML file…

StartTag: invalid element name
Usually this means that you have a stray ‘<’ in your document. This character has special meaning for XML which implies that XML does not treat ‘<’ like a normal text character.

To fix the problem:

Replace ‘<’ with ‘&lt;’ (meaning 'less than').
Whitespace between tags, and in general
I see my actual web page, but some of my words don’t have spaces in between them.
Broken .phtml files
I see the error page:

An error was encountered while parsing the XML file…

warning: failed to load external entity “index.xml
Your .phtml and .xml files must have the same name. The ECEn XML Web Templates use the name of the .phtml file to find its corresponding .xml file. If it isn’t there, your page won’t render.

To fix the problem:

Make sure the .xml and .phtml file have exactly the same name. Case matters: index.xml and INdeX.phtml will cause problems.
Broken .phtml files
I see a blank, white page.
Broken .phtml files
I see the error page:

An error was encountered while parsing the XML file…

I/O error: Permission denied
Hard to read XML files
I see all of the XML on one line with little boxes everywhere.
This probably means you have opened a file in NotePad (Windows) created on Linux/Unix.

This happens many operating systems recognize various newline characters differently.

To fix the problem:

Open the offending XML file in WordPad.(Right click on the file and from the menu, select 'Open with', and from that menu, select WordPad). Save the file in WordPad.

You can then close WordPad and open the file in NotePad. The XML file should be easier to read with the linebreaks in place and the boxes gone. Or, if you like, you can continue to work in WordPad.

Maintained by The ECEn Web Team (other formats). Based on this XML and ver. 3.7 of the ECEn web templates.
Copyright © 1994-2005. Brigham Young University. All Rights Reserved.