Microsoft DirectX 8.0

Xml2Dex Object

Saves and loads Microsoft® DirectShow® Editing Services (DES) project files in Extensible Markup Language (XML).

Requirements

Requires Internet Explorer 4.0 or later.

Methods

CopyXMLNot supported for Visual Basic.
CreateGraphFromFileNot supported for Visual Basic.
DeleteNot supported for Visual Basic.
PasteXMLNot supported for Visual Basic.
PasteXMLFileNot supported for Visual Basic.
ReadXMLNot supported for Visual Basic.
ReadXMLFileLoads an XML project file.
ResetNot supported for Visual Basic.
WriteGrfFileWrites a filter graph to a file in .grf format.
WriteXMLTranslates a timeline to an XML string.
WriteXMLFileTranslates a timeline to XML and writes the XML data to a file.
WriteXMLPartNot supported for Visual Basic.

CopyXML Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.CopyXML(
    pTimeline As Unknown,
    dStart As Double,
    dEnd As Double
)

CreateGraphFromFile Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.CreateGraphFromFile(
    ppGraph As Unknown,
    pTimeline As Unknown,
    FileName As String
)

Delete Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.Delete(
    pTimeline As Unknown,
    dStart As Double,
    dEnd As Double
)

PasteXML Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.PasteXML(
    pTimeline As Unknown,
    dStart As Double
)

PasteXMLFile Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.PasteXMLFile(
    pTimeline As Unknown,
    dStart As Double,
    FileName As String
)

ReadXML Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.ReadXML(
    pXML As Unknown
)

ReadXMLFile Method (Xml2Dex Object)

Xml2Dex Object

Loads an XML project file. This method creates instances of all the objects expressed in the XML file and inserts them into the timeline. The method also applies any attributes given for the timeline, such as frame rate or default effect.

Syntax

object.ReadXMLFile(
    pTimeline As Unknown,
    XMLName As String
)

Parts

object
Object expression that evaluates to an Xml2Dex object.
pTimeline
The AMTimeline object that receives the timeline.
XMLName
String that specifies the name of the file to load.

Error Codes

If the method fails, an error is raised, and Err.Number can be set to the following value:

VFW_E_INVALID_FILE_FORMATInvalid file format.

Remarks

The pTimeline parameter appears in the Microsoft® Visual Basic® Object Browser as type Unknown. In fact, however, this parameter represents an AMTimeline object. The following code example shows how to call this method:

Dim objTimeline as New AMTimeline
Dim objXmlParse as New Xml2Dex
objXmlParse.ReadXMLFile objTimeline, "C:\XTL\Example.xtl"

This method does not clear existing objects from the timeline before it inserts the new objects defined in the XML file. If you need to refresh an existing timeline, call IAMTimeline.ClearAllGroups first.

Reset Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.Reset()

WriteGrfFile Method (Xml2Dex Object)

Xml2Dex Object

Writes a filter graph to a file in .grf format.

Syntax

object.WriteGrfFile(
    pGraph As Unknown,
    FileName As String
)

Parts

object
Object expression that evaluates to an Xml2Dex object.
pGraph
The FilgraphManager object that specifies the filter graph.
FileName
String that specifies the name of the file to write.

Error Codes

If the method fails, an error is raised.

Remarks

The pGraph parameter appears in the Microsoft® Visual Basic® Object Browser as type Unknown. In fact, however, this parameter represents a FilgraphManager object. GraphEdit files are intended for debugging use only. For more information, see Simulating Graph Building with GraphEdit.

WriteXML Method (Xml2Dex Object)

Xml2Dex Object

Translates a timeline to an XML string.

Syntax

object.WriteXML(
    pTimeline As Unknown,
    pbstrXML As String
)

Parts

object
Object expression that evaluates to an Xml2Dex object.
pTimeline
AMTimeline object that specifies the timeline.
pbstrXML
Variable that receives the translated XML string.

Error Codes

If the method fails, an error is raised, and Err.Number can be set to the following value:

E_OUTOFMEMORYInsufficient memory.

Remarks

The pTimeline parameter appears in the Microsoft® Visual Basic® Object Browser as type Unknown. In fact, however, this parameter represents an AMTimeline object. The following code example shows how to call this method:

Dim objTimeline As New AMTimeline
' Create timeline (not shown).

Dim objXmlParser As New Xml2Dex
Dim sXml As String
objXmlParser.WriteXml objTimeline, sXml

WriteXMLFile Method (Xml2Dex Object)

Xml2Dex Object

Translates a timeline to XML and writes the XML data to a file.

Syntax

object.WriteXMLFile(
    pTimeline As Unknown,
    FileName As String
)

Parts

object
Object expression that evaluates to an Xml2Dex object.
pTimeline
The AMTimeline object that specifies the timeline.
FileName
String that specifies the name of the file to write.

Error Codes

If the method fails, an error is raised, and Err.Number can be set to one of the following values:

E_INVALIDARGInvalid argument.
E_OUTOFMEMORYInsufficient memory.

Remarks

This method generates an XML file that represents all the components in the timeline.

The pTimeline parameter appears in the Microsoft® Visual Basic® Object Browser as type Unknown. In fact, however, this parameter represents an AMTimeline object. The following code example shows how to call this method:

Dim objTimeline As New AMTimeline
' Create timeline (not shown).

Dim objXmlParser As New Xml2Dex
objXmlParser.WriteXmlFile objTimeline, "C:\XTL\Example.xtl"

WriteXMLPart Method (Xml2Dex Object)

Xml2Dex Object

Not supported for Visual Basic.

Syntax

object.WriteXMLPart(
    pTimeline As Unknown,
    dStart As Double,
    dEnd As Double,
    FileName As String
)