[fdo-users] XML Output and Namespaces

Brent Robinson brent.robinson at autodesk.com
Thu Sep 2 10:08:13 EDT 2010


Hi Crispin,

There might be a bug in FdoXmlFeatureFlags::GetSchemaLocation() which is called for each namespace by the XmlFeatureSerializer. It expects a schemaLocation to be defined for each namespace, which is a bit inflexible. You can work around it by adding a schemaLocation, to the XML flags, for the namespace. 

Brent.

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Crispin_at_1Spatial
Sent: Thursday, September 02, 2010 8:08 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] XML Output and Namespaces


Hi,

When using the XmlFeatureWriter on an object with association/object
properties the sub properties are in a "wfs" namespace.  However, this is
not defined in the list of namespaces in the XML so I can't convert the
stream/file into a .net XML object.

So I thought I could use something like the sample below.
However, whenever I add a namespace to the xmlFlags and include this in the
serialiser I get an error when I serialise "Item index out of bounds. "

Am I approaching this in the correct way?  I have tried lots of variations
on the theme.

 Crispin


	OSGeo.FDO.Common.StringElement strE = new
OSGeo.FDO.Common.StringElement("xmlns:wfs=\"http://www.opengis.net/wfs\"");

	xmlFlags.Namespaces.Add(strE);

	XmlFeatureSerializer.XmlSerialize(readFeature, xmlFtWriter, xmlFlags);

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/XML-Output-and-Namespaces-tp5490860p5490860.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list