Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Back  Login

Gst::XML Diff - Ruby-GNOME2 Project Website

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

= class Gst::XML

Convert Gst::Element objects into an XML presentation.

== Object Hierarchy

* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gst::Object
        * Gst::XML

== Class Methods

--- Gst::XML.new

    Creates a new Gst::XML parser object.
    * Returns: a newly created Gst::XML object.

--- Gst::XML.write_file(element, filename)

    Converts the given element into XML and writes the formatted XML
    to the specified file name.
    * filename: a file name.  
    * element: a Gst::Element.
    * Returns: true on success, false on failure.

== Instance Methods

--- each_topelement { |element| ... }

    Calls the block for each topelement, passing a reference to
    a Gst::Element object as parameter.
    * Returns: always nil.

--- get_element(element_name)

    This method is used to get a reference to the Gst::Element
    corresponding to name in the pipeline description.  You would use
    this if you have to do anything to the element after loading.
    * element_name: the name of an element.  
    * Returns: a reference to a Gst::Element object if found, otherwise returns nil.

--- parse_file(filename, rootname=nil)

    Fills the Gst::XML object with the corresponding elements from
    the XML file name.  Optionally it will only build the element
    from the element node root (if it is not nil).  
    This feature is useful if you only want to build a specific
    element from an XML file but not the pipeline it is embedded in.
    Pass "-" as file name to read from stdin.  You can also pass a
    URI of any format that libxml supports, including http.
    * rootname: a root name (optional).  
    * filename: a file name.
    * Returns: true on success, false on failure.

--- parse_memory(string, rootname=nil)

    Basically the same as Gst::XML#parse_file except that this method will
    take the XML directly from the memory.
    * rootname: a root name (optional).  
    * string: an XML description inside a string.
    * Returns: true on success, false on failure.

--- topelements

    Retrieves a list of all toplevel elements.
    * Returns: an array of Gst::Element objects.

== Signals

--- object-loaded: self

     * self: Gst::XML: ((*FIXME*))

== See Also

((<Gst>)).

== ChangeLog

- ((<lrz>))