XML Filter


The XML Filter sample extends the filtering capabilities in ArcGIS to provide an the means to view, and select, only XML files. The sample also shows how to create filter for other file types.

How to use:
  1. Register this sample's .dll by compiling the sample or by using Regsvr32.exe.
  2. In order to use the XML Filter in a Visual Basic editor, it is first necessary to provide a reference to the XMLFilter.dll. In Visual Basic select Project>References. Browse to the "XML Filter" and check.
  3. The XML Filter CoClass is now available as a IGxObjectFilter to use in code.


Difficulty: Intermediate

Visual Basic
File Description
GetFilterXMLs.cls Class file implementing IGxObjectFilter interface.
XMLFilter.vbp The project file for the XML Filter.
XMLFilter.dll The compiled project.

Key CoClasses: GxDialog, GxFilterBasicTypes
Key Interfaces: IGxObjectFilter
Key Members: IGxObjectFilter::CanChooseObject, IGxObjectFilter::CanDisplayObject, IGxObjectFilter::CanSaveObject, IGxObjectFilter::Description, IGxObjectFilter::Name