Class | MusicBrainz::Webservice::MBXML |
In: |
lib/rbrainz/webservice/mbxml.rb
|
Parent: | Object |
Class to read the XML data returned by the MusicBrainz web service and create the corresponding model classes. The class understands the MusicBrainz XML Metadata Version 1.0 schema.
See musicbrainz.org/doc/MusicBrainzXMLMetaData for more information on the MusicBrainz XML Metadata schema.
Create a new MBXML instance to parse a MusicBrainz metadata document.
Parameters:
Raises: | MBXML::ParseError |
Read the XML string and create an entity model for the given entity type if it is present in the document.
Returns nil if no entity of the given type is present.
Read the XML string and create a list of entity models for the given entity type. The list is returned as a Model::ScoredCollection. There must be an entity-list element as a child of the metadata element in the document.
Returns an empty Model::ScoredCollection if the list is empty or if no entity-list element can be found.