diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita --- a/Symbian3/PDK/Source/GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-99CC6D00-DC3E-51C2-8152-060FB80F5FCD.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,64 +1,64 @@ - - - - - -Composing -the XML Data -

An MMS client may choose to use the SMIL composer to generate the presentation -part of outgoing messages, alternatively, it may use template SMIL files. -The first option results in a more flexible MMS composer, while the second -may be easier to implement.

-
Procedure
    -
  1. Build a DOM tree.

  2. -
  3. Generate XML data from the DOM tree.

  4. -

Build a DOM tree

The -following steps are required to build the DOM tree:

    -
  1. Create a CMDXMLDocument object.

  2. -
  3. Validate it using any -of the following methods, if required.

      -
    • To validate SMIL data -as it is parsed, an instance of the SMIL DTD class must be passed to the CMDXMLParser on -construction.

    • -
    • To validate SMIL composition, -the SMIL DTD class must be passed to the CMDXMLDocument on -construction.

    • -

    Note: The DTD class provided standard is the SMIL DTD; however -it is possible to implement others. In order to provide support for validating -other DTDs, it is necessary to derive a class from MXMLDtd.

  4. -
  5. Call CMDXMLDocument::DocumentElement() to -get the root node of the DOM tree.

  6. -
  7. Create a child node -of the required type, for example CMDXMLElement or CMDXMLComment.

  8. -
  9. Add the node using CMDXMLNode::AppendChild().

  10. -
  11. The tree can be navigated -as above, as more child nodes are added.

    Nodes can also be manipulated -by using the following functions:

      -
    • CMDXMLNode::RemoveChild()

    • -
    • CMDXMLNode::InsertBefore()

    • -
    • CMDXMLNode::ReplaceChild()

    • -
  12. -

Generate XML data -from the DOM tree

Once the DOM tree has been built it can be used -to generate the XML data. The following steps must be followed to compose -the data:

    -
  1. Create an instance of CMDXMLComposer, -passing in an observer.

  2. -
  3. Call CMDXMLComposer::ComposeFile(), -passing in the name of the file where the XML data is to be written.

  4. -
  5. The composer calls the MMDXMLComposerObserver::ComposeFileCompleteL() function -on the observer when it has completed. The observer can then check the composer -to see if the XML has been generated successfully.

  6. -
-
-SMIL Parser -Overview -Parsing the -XML Data + + + + + +Composing +the XML Data +

An MMS client may choose to use the SMIL composer to generate the presentation +part of outgoing messages, alternatively, it may use template SMIL files. +The first option results in a more flexible MMS composer, while the second +may be easier to implement.

+
Procedure
    +
  1. Build a DOM tree.

  2. +
  3. Generate XML data from the DOM tree.

  4. +

Build a DOM tree

The +following steps are required to build the DOM tree:

    +
  1. Create a CMDXMLDocument object.

  2. +
  3. Validate it using any +of the following methods, if required.

      +
    • To validate SMIL data +as it is parsed, an instance of the SMIL DTD class must be passed to the CMDXMLParser on +construction.

    • +
    • To validate SMIL composition, +the SMIL DTD class must be passed to the CMDXMLDocument on +construction.

    • +

    Note: The DTD class provided standard is the SMIL DTD; however +it is possible to implement others. In order to provide support for validating +other DTDs, it is necessary to derive a class from MXMLDtd.

  4. +
  5. Call CMDXMLDocument::DocumentElement() to +get the root node of the DOM tree.

  6. +
  7. Create a child node +of the required type, for example CMDXMLElement or CMDXMLComment.

  8. +
  9. Add the node using CMDXMLNode::AppendChild().

  10. +
  11. The tree can be navigated +as above, as more child nodes are added.

    Nodes can also be manipulated +by using the following functions:

      +
    • CMDXMLNode::RemoveChild()

    • +
    • CMDXMLNode::InsertBefore()

    • +
    • CMDXMLNode::ReplaceChild()

    • +
  12. +

Generate XML data +from the DOM tree

Once the DOM tree has been built it can be used +to generate the XML data. The following steps must be followed to compose +the data:

    +
  1. Create an instance of CMDXMLComposer, +passing in an observer.

  2. +
  3. Call CMDXMLComposer::ComposeFile(), +passing in the name of the file where the XML data is to be written.

  4. +
  5. The composer calls the MMDXMLComposerObserver::ComposeFileCompleteL() function +on the observer when it has completed. The observer can then check the composer +to see if the XML has been generated successfully.

  6. +
+
+SMIL Parser +Overview +Parsing the +XML Data
\ No newline at end of file