JScript Print XML

So let me apologize to you. I am not a PHP programmer, I am a C # programmer. But I have to maintain a site that was written for my company in PHP and is falling apart. So here is my simple question:

I have the following code:

xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
url = "./viewInvoiceXML.php?soh_id=<? echo($soh_id)  ?>";

xml_doc.load(url);
xmlObj = xml_doc.documentElement;

Later on the page, I will display some XML nodes. I need to see all the returned XML so that I can find the right nodes to display.

How to print this xml_doc or xmlObj on the page? I would just like to see all the XML (tags and all). Is it possible?

------------ Update -----------------

Well, as many of you point out, its a JScript that can create an ActiveXObject.

If its JScript, then I need a way in JScript to show me the XML information. I tell you that I know little about this site.

, XML node.

xmlObj.childNodes(1).childNodes(0).childNodes(6).text
+3
2

, PHP- JScript- . <? echo ... ?> PHP. - JScript, , .

EDIT: JavaScript, JScript. , ActiveXObject JavaScript.

- PHP XML. -, . :

<code>
  <pre>
    <script language="JScript">
     document.write(xml_doc.xml);
    </script>
  </pre>
</code>

HTML (, pre) JScript HTML-. xml - , XMLDOM, XML.

+2

print_r($var) var_dump($var) PHP.

0

Source: https://habr.com/ru/post/1719723/


All Articles