<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma" vLink=purple link=blue>
<DIV>Yes, managed to get it to work. I have some Java code that pulls a geometry out of a database (SDE) and writes it to a local file system file. Seems OL is fairly fussy about the structure of the GML file. Anyway, here is the OL code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>var fbnd = new OpenLayers.Layer.GML("Farm boundary", "./farmfiles/" + farmid + ".xml", {style: farm_style});<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(fbnd);</DIV>
<DIV>&nbsp;</DIV>
<DIV>And here is a sample GML (I experimented with GML structure using one of the OL examples that writes out GML to a text box, then emulated that):</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;wfs:FeatureCollection xmlns:wfs="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>"&gt;<BR>&nbsp; &lt;gml:featureMember xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;feature:features xmlns:feature="<A href="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</A>" fid="OpenLayers.Feature.Vector"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;feature:geometry&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;gml:Polygon&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;gml:outerBoundaryIs&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;gml:LinearRing&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;gml:coordinates decimal="." cs=", " ts=" "&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1821412.509, 5534791.015 1821458.847, 5534735.59 1821598.037, 5534849.028 1821614.701, 5534862.607 1821673.566, 5534910.58 1821659.449, 5534927.465 1821655.449, 5534932.249 1821627.218, 5534966.016 1821412.509, 5534791.015<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/gml:coordinates&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/gml:LinearRing&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/gml:outerBoundaryIs&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/gml:Polygon&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/feature:geometry&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/feature:features&gt;<BR>&nbsp; &lt;/gml:featureMember&gt;<BR>&lt;/wfs:FeatureCollection&gt;<BR></DIV>
<DIV>Kind regads,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>&gt;&gt;&gt; "Burgholzer,Robert" &lt;rwburgholzer@deq.virginia.gov&gt; 25/04/2008 5:30 a.m. &gt;&gt;&gt;<BR></DIV>
<DIV style="COLOR: #000000">
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Has anyone loaded a simple KML/GML layer from a local text file?&nbsp; Maybe this is trivial … </DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks!</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">r.b.</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Robert W. Burgholzer</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Surface Water Modeler</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Office of Water Supply and Planning</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Virginia</DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Department</DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> of Environmental Quality</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><A href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</A></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">804-698-4405</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Open Source Modeling Tools:</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><A href="http://sourceforge.net/projects/npsource/">http://sourceforge.net/projects/npsource/</A></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><DEFANGHTML_SPAN style="FONT-SIZE: 12pt"></DEFANGHTML_SPAN></FONT></P></DIV><BR><BR><FONT style="BACKGROUND-COLOR: #ffffff">
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">Click <A href="https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==">here</A> to report this email as spam.</FONT></P></FONT></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc.  </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>