Node JS debug

Post Reply
Sunnyland
Member
Posts: 56
Joined: Mon Aug 19, 2013 1:34 am

Node JS debug

Post by Sunnyland »

Ok so really wet behind the ears with Nodejs but thought I would change a couple of my scripts from javascript to NodeJs, so far I have just made a basic script that I copied from the Enfocus scripting manual and run it. Idea is just to get a feel for the debug system first and then work on the rest.

What I have found is that everytime I update the main.js file, I have to go into switch scripter relink main.js, and restart the flow for the changes to be applied. Does that sound right?

Also since I am learning NodeJs at the sametime wnat would I use to read an XML file to get the values of specific nodes. The best I can find so far seems to be xml-query@1.5.0 or is there something better?
mkayyyy
Member
Posts: 75
Joined: Mon Nov 21, 2016 6:31 pm
Location: UK

Re: Node JS debug

Post by mkayyyy »

What I have found is that everytime I update the main.js file, I have to go into switch scripter relink main.js, and restart the flow for the changes to be applied. Does that sound right?
That's correct. I've found that whilst working on a script leaving it open in SwitchScripter will save you having to select the updated main.js file again (As it will still be pointed to the main.js file you selected, see screenshot below). Then you can save it in SwitchScripter and restart the flow.
Image
Also since I am learning NodeJs at the sametime wnat would I use to read an XML file to get the values of specific nodes. The best I can find so far seems to be xml-query@1.5.0 or is there something better?
For XML and XPath so far I've used both these packages https://www.npmjs.com/package/xmldom and https://www.npmjs.com/package/xpath together.

I had to spend a fair bit of time reading through the docs and a bit of Googling (But I've had to do that with most Node packages so far to be fair :lol: ) but got them working as I needed in a script that reads a dataset and updates/adds nodes.
Sunnyland
Member
Posts: 56
Joined: Mon Aug 19, 2013 1:34 am

Re: Node JS debug

Post by Sunnyland »

Cheers mkayyy, that is working perfectly.

Just spent all day trying to do a SOAP request, another question for the forum I think. :D
Post Reply