PDA

View Full Version : Only one top level element is allowed error


tim.calderwood
08-01-2004, 01:01 PM
I am having problems with converting the XML logs to HTML. The steps I am doing are...

0. Build our software in performance debug
1. Copy xml file (%LOGFILE%) to a temp file
2. Convert the temp file to XML using the built in function
3. Copy new HTML file to remote server

4. Build our software in release
5. Copy xml file (%LOGFILE%) to a temp file
6. Convert the temp file to XML using the built in function

At this point I get the "Only one top level element is allowed in an XML document." error. Since I am converting a copy of the orginal log in each build loop, I am not sure why I am getting this error. I have the option "Delete log file at the start of each build check" So when I call the script from other script, we start with a new log.

I am attaching the steps to reproduce the error.

kevina
08-02-2004, 09:49 AM
First, the manual copy to a manual location is unnecessary because the Transform XML Log step already does this if the "Close input log file XML tags" checkbox is checked.

Secondly, you don't provide enough information to determine what is wrong with your build files. For example, do both the master and child builds use the same LOGFILE macro value?

Have you looked at the logging.bld sample? This sample build demonstrates how to handle chained builds with xml logging (typically the "Delete log file at the start of each build check is not used").

Please look at the logging.bld sample for tips on how to handle transformed xml logs... If this doesn't address your situation, please provide a reproducible case (both build files that do not require your local environment).

tim.calderwood
08-03-2004, 11:24 AM
The problem was in the fact that instead of calling a local group, I was calling another build script. With the option set to "Delete log file at the start of each build", you get this error when you do this. As has been pointed out before in this forum.

A feature in the future might give a way to override by a check box when calling a sub build script instead using code.

Thanks for your time and help....