Page 1 of 1

Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Tue Oct 11, 2016 12:29 am
by julian_atkinson
I seem to be having this problem with the xml_read file.

Undefined function or variable 'DOMnode'.

Error in xml_read (line 132)
Node = DOMnode.getFirstChild;

I only get it with reading the laboratories file, and not the Acquisition file. This includes with the existing laboratories file.

***Update

It appears that the problem is with this line:
DOMnode = xmlread(xmlfile);

It does not proceed past this line of code.

Thank you for your help!

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Tue Oct 11, 2016 7:30 am
by julian_atkinson
I have solved my problem. It had to do with file directories.

If you are experiencing the same problem contact me for more details.

Also, I noticed in the code that the following function is used:

DataSetPath = uigetdir('Select your dataset folder');

However when the code is run the top of the dialog box message is "Select dialog box to open". I fixed this by changing the code to the following:

DataSetPath = uigetdir('','Select your dataset folder');

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Wed Nov 02, 2016 6:26 am
by liuxinyu
HI,

I also have the same problem like you. Here are my code errors.

??? Undefined function or variable "DOMnode".

Error in ==> xml_read at 132
Node = DOMnode.getFirstChild;

Error in ==> ElaborationInterface at 65
acquisitionInfo=xml_read([foldersPath.inputData filesep 'acquisition.xml']);

can you help me with that?

Thank you!

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Mon Nov 07, 2016 2:25 am
by julian_atkinson
Hi Xinyu

So the problem has to do with where it is trying to access the files from.

I added this piece of code to fix it:

In elaborationInterface.xml:

sharedDir = uigetdir('','Select your MOtoNMS shared directory'); %Added by Julian

addSharedPath(sharedDir) %Edited by Julian

In addSharedPath.xml:

function []=addSharedPath(sharedDir)

cd(sharedDir) %Edited by Julian

I hope this helps.

Regards,
Julian

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Fri Dec 02, 2016 10:58 am
by lijov2007
Hi Julian,

I also face the same problem. I am getting the following error:

Undefined function or variable 'DOMnode'.

Error in xml_read (line 132)
Node = DOMnode.getFirstChild;

Error in AcquisitionInterface (line 91)
Laboratory=xml_read([laboratoryPath laboratoryName],Pref);

Error in mainAcquisitionInterface (line 51)
AcquisitionInterface();


I couldn't find the function uigetdir in the xml_read file. Could you please help me to solve this problem?

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Mon Feb 27, 2017 2:31 am
by ssiv
Hi Julian,

I am getting the same error when I try to input the laboratory file. Please advice me how to solve this issue.

Many Thanks!

julian_atkinson wrote:I have solved my problem. It had to do with file directories.

If you are experiencing the same problem contact me for more details.

Also, I noticed in the code that the following function is used:

DataSetPath = uigetdir('Select your dataset folder');

However when the code is run the top of the dialog box message is "Select dialog box to open". I fixed this by changing the code to the following:

DataSetPath = uigetdir('','Select your dataset folder');

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Wed Aug 28, 2019 6:01 am
by mariamroy21
I fixed it by changing the location of the laboratory file to ..\MOtoNMS v2.2\SetupFiles\AcquisitionInterface\Laboratories. Similarly, changed the location of all the other setup files for the acquitionInterface under AcquisitionInterface folder.

Re: Error in xml_read (line 132) Node = DOMnode.getFirstChild; (Solved)

Posted: Sat Apr 27, 2024 8:21 pm
by sdyws
mariamroy21 wrote:
Wed Aug 28, 2019 6:01 am
I fixed it by changing the location of the laboratory file to ..\MOtoNMS v2.2\SetupFiles\AcquisitionInterface\Laboratories. Similarly, changed the location of all the other setup files for the acquitionInterface under AcquisitionInterface folder.
Can you tell me the detail?please ! bow to yoou!!!