Demo : Simple Demo of Convert XML to Array in PHP

Array
(
    [moleculedb] => Array
        (
            [molecule] => Array
                (
                    [0] => Array
                        (
                            [symbol] => ben
                            [code] => A
                            [@attributes] => Array
                                (
                                    [name] => Benzine
                                )

                        )

                    [1] => Array
                        (
                            [symbol] => h2o
                            [code] => K
                            [@attributes] => Array
                                (
                                    [name] => Water
                                )

                        )

                    [2] => Array
                        (
                            [symbol] => h2o
                            [code] => K
                            [@attributes] => Array
                                (
                                    [name] => Parvez
                                )

                        )

                )

        )

)