[fdo-users] metada access (shp.xml)

Dan Stoica dan.stoica at autodesk.com
Wed Aug 5 18:26:43 EDT 2009


Hi Eric,

Here is an educated response from Brent Robinson...

I've never heard of <ftname> as a schema element either. It could be from an XML file containing features, where ftname would be a property name and article55_sru01 the value for a particular feature. However, he mentions that the xml file has the SHP table metadata so it sounds like a config file containing schema. 

If it's a config file then the only commands that can be used to look at it would be DescribeSchema and DescribeSchemaMappings, but that would be fairly indirect, they would retrieve the resulting schema info after the config file has been read by the FDO Connection.

If he wants to read the XML file directly, FdoXmlReader could be used. FdoXmlReader is only a SAX parser; it does not do anything with the XML except fire callbacks as each part of the document is read. To process the file, he needs to create a class derived from FdoXmlSaxHandler, implement the required callbacks, and pass it to FdoXmlReader::Parse(). Using FdoXmlReader would only be one option. The .Net XML classes or any XML parser (such as Xerces) could be used to read the XML file.

Cheers,
Dan.

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Ricostas
Sent: Wednesday, August 05, 2009 10:20 AM
To: fdo-users at lists.osgeo.org
Subject: RE: [fdo-users] metada access (shp.xml)


Hi Dan,
Thank you for your answer.

In fact i need to collect some information contain in a xml file.
Each of my shpfile has a .xlm associate file. This xml document contains the
metadata of the shp file.
For exemple, i need to collect the chain of character between the two tag:
<ftname>article55_sru02</ftname> 
May be it's better to use some method of the  FdoXmlReader   class...
But i wan to know if it's possible to do that with a query command like
CommandType_Select
I hope that my question is comprehensible :)

Regards,
Eric

Dan Stoica wrote:
> 
> Hi,
> 
> Here is an example (unmanaged):
> 
>         FdoPtr<FdoIConnection> connection = ...;
> 
>         connection->SetConnectionString (L"DefaultFileLocation="
> ONTARIO_LOCATION);
>         FdoIoFileStreamP fileStream =
> FdoIoFileStream::Create(L"ShpSchemaConfig.xml", L"r");
> 
>         connection->SetConfiguration(fileStream);
>         connection->Open();
> 
> Is this what you need?
> 
> Dan.
> 
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Eric Dureault
> Sent: Tuesday, August 04, 2009 10:21 AM
> To: fdo-users at lists.osgeo.org
> Subject: [fdo-users] metada access (shp.xml)
> 
> Hello,
> 
> I am currently working on a project of administration of geographic data.
> For now, I'm just working on data in the format shape (shp).
> I've begun to work with FDO last week so i have not a great experience...
> 
> I create a connection:
> fdoconnectionmgr = FeatureAccessManager.GetConnectionManager()
> iconnection = fdoconnectionmgr.CreateConnection(OSGeo.SHP.3.4)
> 
> and open it with this connectionstring:
> iconnection.ConnectionString = "DefaultFileLocation = C:\....\road.shp"
> iconnection.Open()
> 
> The connectoin state is correctly show as "open"
> 
> Now I need to access to the metada contain in the .xml associed file and i
> don't know how to do this...
> Is it possible to do this with : CommandType.CommandType_Select  or i need
> to use something else?
> Have you got an exemple for this type of query commands?
> 
> Appreciate your cooperation in advance
> Regards,
> 
> Eric
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/metada-access-%28shp.xml%29-tp3384807p3392170.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