Hi Durk,
Durk Talsma wrote:
I therefore
suspect something might have gone wrong with the formatting of your xml file.
Could there be extra whitespaces or other characters that might have
influenced this? The fact that you mention 26 spaces between find and "YMML
makes me suspicious that this might be the case.
Good call. The problem was that I like to format XML files using leading
tab characters to indent elements. Apparently FlightGear's XML parser
has problems with tabs. When I removed all tab characters from the file
/usr/share/games/FlightGear/Traffic/QAN/737/QAN01.xml the error message
went away. I now have a Qantas-liveried 737-300 sitting on the tarmac at
Tullamarine airport[1].
When my file was formatted like this:
\t\t\t\t<port>YMML</port>
FG reported the error message:
Could not find\t\t\t\tYMML
Yes, it was /tabs/ in the message, not spaces. The spaces must have been
converted to tabs when I copied-and-pasted the error message from the
terminal window. What is very odd is that the tab characters were
/outside/ the <port> element. The XML parser should not have confused
text (including whitespace) between elements with the text within elements.
So, the solution is apparently not to use tabs when formatting traffic
files. This is a trap for the unwary, though. Maybe the XML parser
should be updated to include only the text within elements?
Many thanks to all who responded to my question.
Regards,
Greg Hawkes
[1] The AI aircraft now appears on the tarmac. It doesn't fly, but
that's an issue for another thread.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users