<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>ByteReader Problem</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR>
<STYLE> @font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Webdings;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"
}
SPAN.emailstyle18 {
        COLOR: navy; FONT-FAMILY: Arial
}
SPAN.emailstyle19 {
        COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle20 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=481074610-04092007><FONT face=Arial 
color=#0000ff size=2>Thanks Dennis, I'll look into it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=481074610-04092007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=481074610-04092007><FONT face=Arial 
color=#0000ff size=2>Keith</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Jonio, 
Dennis (Aviation)<BR><B>Sent:</B> 04 September 2007 11:32<BR><B>To:</B> MapGuide 
Users Mail List<BR><B>Subject:</B> RE: [mapguide-users] ByteReader 
Problem<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Glad to hear it 
&#8230;</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt">I know this is unsolicited but I noticed you were/are 
using </SPAN></FONT><FONT face="Courier New" color=#2b91af size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'">XmlDocument</SPAN>.</SPAN></FONT> 
Good choice. <B><FONT face=Arial color=black size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">XPathNavigator 
</SPAN></FONT></B>works well. Just keep in mind the extra octet that MS put in 
front when you serialize out of <FONT face="Courier New" color=#2b91af 
size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'">XmlDocument</SPAN>.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Tahoma 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Campbell, Keith A<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> </SPAN></FONT><FONT face=Tahoma 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Monday, September 03, 
2007</SPAN></FONT><FONT face=Tahoma size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> </SPAN></FONT><FONT face=Tahoma 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">8:26 
AM</SPAN></FONT><FONT face=Tahoma size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><BR><B><SPAN 
style="FONT-WEIGHT: bold">To:</SPAN></B> MapGuide Users Mail List<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [mapguide-users] ByteReader 
Problem</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Great, that seems to 
work, thanks.</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<DIV class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class="MsoNormal" 
defanghtml_style="margin-right:0in;margin-bottom:12.0pt;margin-left:&#13;&#10;.5in"><B><FONT 
face=Tahoma size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Jonio, Dennis 
(Aviation)<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> 31 August 2007 
17:04<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> MapGuide Users Mail 
List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: 
[mapguide-users] ByteReader Problem</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">This is what I use in 
real life &#8230; I did not understand. &nbsp;I was illustrating the 8K thingee. It 
caught me to. &nbsp;</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
string lib_layer_definition = 
resourceService.GetResourceContent(resId).ToString();</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
byte[] layerDefinition = new 
byte[lib_layer_definition.Length];</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
int byteCount = Encoding.UTF8.GetBytes(lib_layer_definition, 0, 
lib_layer_definition.Length, layerDefinition, 0);</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Tahoma 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Campbell, Keith A<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, August 31, 2007 11:32 
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> MapGuide Users Mail 
List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: 
[mapguide-users] ByteReader Problem</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Thanks 
Dennis.</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">I've tried this, but 
I'm only getting 8192 bytes read into the byte buffer. This seems to be the 
problem mentioned by Kenneth. The Read method doesn't seem to allow the start 
location for the read to be set, so looping until the entire content of the 
Resource is read into the buffer doesn't seem to be an option.</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Presumably somebody 
must have found a way around this.</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=blue size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Keith</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<DIV class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><B><FONT face=Tahoma 
size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Jonio, Dennis 
(Aviation)<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> 31 August 2007 
14:05<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> MapGuide Users Mail 
List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: 
[mapguide-users] ByteReader Problem</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><!-- Converted from text/rtf format -->&#8230; 
this sequence tends to work &nbsp;&nbsp;&nbsp;&nbsp;</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
// For some reason the MgByteReader "disappears"</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp; 
// This seems to work ....</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
long long_length = rs.GetResourceContent(resId).GetLength();</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
byte[] byteBuffer = new byte[long_length];</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Arial 
color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
int numBytes = rs.GetResourceContent(resId).Read(byteBuffer, 
(int)long_length);</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT face=Tahoma 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
mapguide-users-bounces@lists.osgeo.org 
[mailto:mapguide-users-bounces@lists.osgeo.org] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Campbell, Keith A<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, August 31, 2007 7:10 
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> MapGuide Users Mail 
List<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> [mapguide-users] 
ByteReader Problem</SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P defanghtml_style="margin-left:.5in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am trying to alter a map 
definition through the API and cannot get the contents of the MgByteReader in 
string format. Here's the code:-</SPAN></FONT></P>
<P defanghtml_style="margin-left:.5in"><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=#2b91af><SPAN style="COLOR: #2b91af">String</SPAN></FONT> 
mapDefinition = <FONT color=#a31515><SPAN style="COLOR: #a31515">"Library://My 
Folder/Maps/My Map.MapDefinition"</SPAN></FONT>;</SPAN></SPAN></SPAN></FONT> 
<BR><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=#2b91af><SPAN 
style="COLOR: #2b91af">MgResourceIdentifier</SPAN></FONT> MapResID = <FONT 
color=blue><SPAN style="COLOR: blue">new</SPAN></FONT> <FONT color=#2b91af><SPAN 
style="COLOR: #2b91af">MgResourceIdentifier</SPAN></FONT>(mapDefinition);</SPAN></SPAN></SPAN></FONT> 
</P>
<P defanghtml_style="margin-left:.5in"><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=#2b91af><SPAN style="COLOR: #2b91af">MgByteReader</SPAN></FONT> 
mapByteRdr = res.GetResourceContent(MapResID);//res is instantiated Resource 
Service.</SPAN></SPAN></SPAN></FONT> </P>
<P defanghtml_style="margin-left:.5in"><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<FONT color=#2b91af><SPAN style="COLOR: #2b91af">XmlDocument</SPAN></FONT> doc = 
<FONT color=blue><SPAN style="COLOR: blue">new</SPAN></FONT> <FONT 
color=#2b91af><SPAN 
style="COLOR: #2b91af">XmlDocument</SPAN></FONT>();</SPAN></SPAN></SPAN></FONT> 
<BR><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN></SPAN></FONT><BR><FONT face="Courier New" size=2><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN 
defanghtml_style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
doc.LoadXml(mapByteRdr.ToString());</SPAN></SPAN></SPAN></FONT> </P>
<P defanghtml_style="margin-left:.5in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">LoadXML fails with an error ' Root 
element is missing'. I can copy the contents of</SPAN></FONT> <FONT face=Arial 
size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">mapByteRdr from Visual 
Studio at runtime and it contains properly formatted XML for the map definition. 
If I use the ToFile() method, the resultant file is empty. I cannot see why 
these two methods do not return the xml string in the reader. Any help is 
welcome.</SPAN></FONT></P>
<P defanghtml_style="margin-left:.5in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Cheers,</SPAN></FONT> </P>
<P defanghtml_style="margin-left:.5in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Keith</SPAN></FONT> </P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><B><FONT face=Arial 
size=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">This 
email and any attached files are confidential and copyright protected. If you 
are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in this 
communication shall be legally binding.</SPAN></FONT></B> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The ultimate 
parent company of the Atkins Group is WS Atkins plc. Registered in England No. 
1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 
5BW.</SPAN></FONT> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Webdings color=green size=5><SPAN 
style="FONT-SIZE: 18pt; COLOR: green; FONT-FAMILY: Webdings">P</SPAN></FONT> 
<B><FONT face=Arial color=green size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Arial">Consider 
the environment. Please don't print this e-mail unless you really need 
to.</SPAN></FONT></B> </P>
<DIV>
<DIV class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">E-mails are 
automatically scanned for viruses using McAfee. </SPAN></FONT></P></DIV>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt; BACKGROUND: white">This message has been scanned for 
viruses by <A href="http://bluepages.wsatkins.co.uk/?6875772"><FONT 
color=black><SPAN 
style="COLOR: black">MailControl</SPAN></FONT></A></SPAN></FONT></P>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><B><FONT face=Arial 
size=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">This 
email and any attached files are confidential and copyright protected. If you 
are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in this 
communication shall be legally binding.</SPAN></FONT></B> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The ultimate 
parent company of the Atkins Group is WS Atkins plc. Registered in England No. 
1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 
5BW.</SPAN></FONT> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Webdings color=green size=5><SPAN 
style="FONT-SIZE: 18pt; COLOR: green; FONT-FAMILY: Webdings">P</SPAN></FONT> 
<B><FONT face=Arial color=green size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Arial">Consider 
the environment. Please don't print this e-mail unless you really need 
to.</SPAN></FONT></B> </P>
<DIV>
<DIV class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">E-mails are 
automatically scanned for viruses using McAfee. </SPAN></FONT></P></DIV>
<P class="MsoNormal" 
defanghtml_style="margin-right:0in;margin-bottom:12.0pt;margin-left:&#13;&#10;.5in"><FONT 
face="Times New Roman" size=3><SPAN 
style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
<P class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><B><FONT face=Arial 
size=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">This 
email and any attached files are confidential and copyright protected. If you 
are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in this 
communication shall be legally binding.</SPAN></FONT></B> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The ultimate 
parent company of the Atkins Group is WS Atkins plc. Registered in England No. 
1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 
5BW.</SPAN></FONT> </P>
<P align="center" defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face=Webdings color=green size=5><SPAN 
style="FONT-SIZE: 18pt; COLOR: green; FONT-FAMILY: Webdings">P</SPAN></FONT> 
<B><FONT face=Arial color=green size=2><SPAN 
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: Arial">Consider 
the environment. Please don't print this e-mail unless you really need 
to.</SPAN></FONT></B> </P>
<DIV>
<DIV class="MsoNormal" align="center" 
defanghtml_style="margin-left:.5in;text-align:center"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class="MsoNormal" defanghtml_style="margin-left:.5in"><FONT 
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">E-mails are 
automatically scanned for viruses using McAfee. 
</SPAN></FONT></P></DIV></DIV><br><br>
<CENTER><FONT face="Arial, Helvetica, sans-serif" size=2><B>This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.</B></FONT> 
<P><FONT face="Arial, Helvetica, sans-serif" size=2>The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.</FONT> 
<P><FONT face=Webdings color=green size=5>P</FONT> <FONT face="Arial, Helvetica, sans-serif" color=green size=2><B>Consider the environment. Please don't print this e-mail unless you really need to.</B></FONT> </CENTER></P>
</body></HTML>