Commit 7f567448 authored by Timothy Stack's avatar Timothy Stack

Use a marker to separate user output from the parser's xml output so

xmlconvert won't choke on it.
parent 74beb3f6
......@@ -267,6 +267,18 @@ sub readXML($$$$) {
}
if ($fromparser) {
my $line = <STDIN>;
# Scan for the beginning marker or EOF.
while ($line && ($line ne "#### BEGIN XML ####\n")) {
print "$line"; # Print it out for the user.
$line = <STDIN>;
}
if (!$line) {
fatal("NS script never reached \"\$ns run\"");
}
#
# Create a parser.
#
......
......@@ -1111,6 +1111,9 @@ Simulator instproc spitxml_init {} {
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
# Add a marker so xmlconvert can tell where user output stops and
puts "#### BEGIN XML ####"
# ... XML starts.
puts "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
puts "<virtual_experiment pid='$pid' eid='$eid'>"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment