<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
And you have not added the ? when saving?<br>
<br>
A guess would be that the Xml has the UTF-8 BOM when you are saving it,<br>
and the loading code does not accept it, and inserts a placeholder for
a non-printable char.<br>
<br>
When you have the string in .Net and want to get the bytes, try to do
this:<br>
System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding(false,
true);<br>
byte[] bytes = encoder.GetBytes(layerDefXml);<br>
Then pass the bytes when saving the layerdefinition.<br>
<br>
I have created a special Xml serializer class to deal with this in the
MaestroAPI:<br>
<a class="moz-txt-link-freetext" href="http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MaestroAPI/Utf8XmlWriter.cs">http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MaestroAPI/Utf8XmlWriter.cs</a><br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Matteo skrev:
<blockquote cite="mid:1240126851391-2658472.post@n2.nabble.com"
type="cite">
<pre wrap="">Yes, the code add a "?" char before the "<?xml version="1.0" encoding="UTF-8"?>" line.
Regards,
Matteo
That would suggest that the data in the resource is invalid xml?
Have you tried to examine the layerDefString variable before the crash?
Regards, Kenneth Skovhede, GEOGRAF A/S
Matteo skrev:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Kenneth,
I have found the bug. The problem is on BuildLayerDefinitionData sub of Legend.aspx file. When the sub process a runtime layer the line doc.LoadXml(layerDefString) get a error. I solve the problem saving the xml definition of layer in a file and load it
The same problem there is in MapGuide Enterprise 2010 so I think also in MapGuide Open Source 2.1
Regards
Matteo
Have you tried with a subset of the filter? eg: only: callStatus like
'Completed'.
I have had trouble with composite filters on OGR datasources, but single
filters work fine.
The "valid = 01" part looks a little suspicious to me, is "valid" a
numeric or text column?
Regards, Kenneth Skovhede, GEOGRAF A/S
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
</body>
</html>