필터 지우기
필터 지우기

Running perl script from matlab

조회 수: 4 (최근 30일)
Sunu
Sunu 2012년 1월 20일
I was trying to run a perl script which parses an XML file using XMLin and print the result, but perl('print.pl') gives this error System error: not well-formed (invalid token) at line 1988, column 181, byte 68317 at %matlabroot%/sys/perl/win32/lib/XML/Parser.pm line 187.
I have used use XML::Simple; Any suggestion on the above
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2012년 1월 20일
Have you tried running "perl print.pl" outside of MATLAB to see if this issue is independent of MATLAB?
Sunu
Sunu 2012년 1월 23일
I did and it says cannot locate XML/Simple.pm.

댓글을 달려면 로그인하십시오.

채택된 답변

Jason Ross
Jason Ross 2012년 1월 20일
Your XML input file is not "well formed", so the parser fails. "Well formed" means that all tags are terminated, among some other things, but this is a more thorough definition.
Check out the location indicated with a text editor (which will let you find the position indicated very quickly) to see if there is something glaringly wrong -- for example an unmatched ">" or "<". A very quick check if you don't have an XML authoring tool is to try and open the file in a Web browser. If it's valid XML you will be able to read the contents of the file, if it's not, you will get an error. Keep working with the file in a text editor until it loads in the browser, and then you should be able to parse it.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by