vlc_linux/vlc-3.0.16/modules/access/dcp/dcpparser.cpp
/*
 * Reads first node in XML and returns
 * 1 if XML is CPL,
 * 0 if not
 * -1 on error
 */
Reads first node in XML and returns
1 if XML is CPL,
0 if not
-1 on error
Reads first node in XML and returns 1 if XML is CPL 0 if not - 1 on error
int XmlFile::isCPL()
{
    string node;
    int type, ret = 0;
    if( this->OpenXml() )
    {
        msg_Err( this->p_demux, "Failed to open CPL XML file" );
        return -1;
    }
    type = XmlFile::ReadNextNode( this->p_demux, p_xmlReader, node );
    if( type == -1 ) 
        ret = -1;
    if( type == XML_READER_STARTELEM &&  node == "CompositionPlaylist" )
        ret = 1;
    this->CloseXml();
    return ret;
}
int XmlFile :: isCPL ( ) { string node ; int type , ret = 0 ; if ( this -> OpenXml ( ) ) { msg_Err ( this -> p_demux , " " ) ; return -1 ; } type = XmlFile :: ReadNextNode ( this -> p_demux , p_xmlReader , node ) ; if ( type == -1 ) ret = -1 ; if ( type == XML_READER_STARTELEM && node == " " ) ret = 1 ; this -> CloseXml ( ) ; return ret ; }
Reads first node in XML and returns
 1 if XML is CPL,
 0 if not
 -1 on error
Reads first node in XML and returns 1 if XML is CPL 0 if not - 1 on error
/* read 1st node  and verify that is a CPL */ /* error */ /* close xml */