Rick Goncalves - 2018-10-01

Hi,

I'm new to web-harvest, any help you can provide would be much appreciated.

I have a page that is outputting javascript containing a JS variable: domainList. This variable value is a JSON script, so I assume I can use JSON to XML to then xpath the items/name values. I'm looking to build a list of the name values.

here is the actual javascript text I need to parse. thanks in advance.

<script type="text/javascript">
             if (self != top) {
                 top.location = self.location;
             }
             require(["dp/layers/loginlayer","dojo/domReady!"],function(){
                require(["dojo/parser", "dp/Login", "dojo/ready"], function(parser, Login, ready){
                  ready(function(){

                    parser.parse();

                    var domainList = {
                        "identifier": "id",
                        "items": [
                        { "name": "default", "id": "default" }, { "name": "dp_Common", "id": "dp_Common" }, { "name": "hr_etime", "id": "hr_etime" }, { "name": "hr_us_ew2", "id": "hr_us_ew2" }, { "name": "isc_tools_mfg_omcs", "id": "isc_tools_mfg_omcs" }, { "name": "mq_Adapter", "id": "mq_Adapter" }, { "name": "partnerworld_websvc_bpw", "id": "partnerworld_websvc_bpw" }, { "name": "sc_prod", "id": "sc_prod" }
                        ]
                    };

                    login = new Login();
                    login.startup(domainList,"XI52",
                        "b03eixmlapp005",
                        "",
                        "",
                        "XI52.7.6.0.9");
                  });
                });
             });
            </script>