Instead of getting the dataset:
// Retrieve the first feature dataset from the workspace.
IEnumDatasetName enumDatasetName = workspace.get_DatasetNames
(esriDatasetType.esriDTFeatureDataset);
You can get the feature class by:
IEnumDatasetName enumDatasetName = workspace.get_DatasetNames(esriDatasetType.esriDTFeatureClass);
See this thread:
Exporting/importing a geodatabase feature class to an XML file
UPDATE
You can get fc names within geodatabase/feature dataset using this code (solution in VB.NET):
Sub TestGetContents()
Try
Dim pGxApp As IGxApplication
Dim Type As System.Type = System.Type.GetTypeFromCLSID(GetType(ESRI.ArcGIS.Framework.AppRefClass).GUID)
pGxApp = TryCast(Activator.CreateInstance(Type), ESRI.ArcGIS.CatalogUI.IGxApplication)
'select geodatabase in Catalog tree
If Not TypeOf pGxApp.SelectedObject Is IGxDatabase Then
Debug.Print("select a geodb first")
Exit Sub
End If
Dim c As Collection
c = GetContents(pGxApp.SelectedObject)
Dim l As Long
For l = 1 To c.Count
Dim pName As IName
pName = c.Item(l)
If TypeOf pName Is IFeatureClassName Then
Dim pFC As IFeatureClass
pFC = pName.Open
MessageBox.Show(pFC.AliasName)
ElseIf TypeOf pName Is IFeatureDatasetName Then
Dim pDSName As IDatasetName
pDSName = pName
MessageBox.Show(pDSName.Name)
End If
Next l
Catch ex As Exception
MessageBox.Show("Caught an unspecified error in the calling code: " & vbCrLf & ex.ToString)
End Try
End Sub
Function GetContents(ByVal pGxDB As IGxDatabase) As Collection
Try
Dim c As New Collection
Dim pEnumDSName As IEnumDatasetName
pEnumDSName = pGxDB.Workspace.DatasetNames(esriDatasetType.esriDTAny)
Dim pDSName As IDatasetName
pDSName = pEnumDSName.Next
Do Until pDSName Is Nothing
If TypeOf pDSName Is IFeatureClassName Then
c.Add(pDSName)
ElseIf TypeOf pDSName Is IFeatureDatasetName Then
c.Add(pDSName)
AddSubNames(pDSName, c)
End If
pDSName = pEnumDSName.Next
Loop
GetContents = c
Catch ex As Exception
MessageBox.Show("Caught an unspecified error in the calling code: " & vbCrLf & ex.ToString)
End Try
End Function
Sub AddSubNames(ByVal pDSName1 As IDatasetName, ByVal c As Collection)
Try
Dim pEnumDSName As IEnumDatasetName
pEnumDSName = pDSName1.SubsetNames
pEnumDSName.Reset()
Dim pDSName2 As IDatasetName
pDSName2 = pEnumDSName.Next
Do Until pDSName2 Is Nothing
If TypeOf pDSName2 Is IFeatureClassName Then
c.Add(pDSName2)
End If
pDSName2 = pEnumDSName.Next
Loop
Catch ex As Exception
MessageBox.Show("Caught an unspecified error in the calling code: " & vbCrLf & ex.ToString)
End Try
End Sub
Code referenced from this post:
ArcObjects - enumerating feature classes and datasets within a geodatabase
CityGML Data such as Level-of-Detail 1 can be uploaded with the 3D City Database Importer / Exporter Tool downloadable here: 3D City Database.
The setup is relatively straightforward and documented here.
I would still love to have a pure python solution tho as this is more than I need for what I want.
Best Answer
As far as i know there is no such tool, as the last comment in your Linked Question mentioned. The problem with xml is that it is extensible... It means anyone can create a new schema or alter an existing one. Its a hierarchical document type with lots of possiblities to use different attributes and so on. When you want to change a schema you need to transform quite a lot, and often you can´t even transform some attributes since their meaning is different. These transformations are uniqe for each given two schemas. This leads to the problem that you need to create such transformations or completly parse the xml document new in a given programming language. So you need to have a tool for each different schemas out there. That leads to only a few ones that are really common, like the ones from OGC (gml) or Google´s KML.
So maybe there is a tool for a particular schema, but not a general transformer like you might need, as you posted the list with the ESF-ones. In Qgis-standard-repository i don´t know of one. Maybe there is something for Altova XML as they are the most well known xml programmers.