Error in XML : Empty XML namespace is not allowed

조회 수: 14 (최근 30일)
An Engineer
An Engineer 2023년 4월 20일
편집: An Engineer 2023년 4월 20일
Hi everyone .
I,m trying to read a webpage ( which is dictionary webpage ) with matlab and convert html data to text with extractHTMLText for get some informations but MATLAB gives this error :
" Error in XML : Empty XML namespace is not allowed . "
Since I am not a professional programmer , I am not familiar with the namespace and its errors .
code :
url='https://www.vocabulary.com/dictionary/river';
options = weboptions('Timeout', 10);
code = webread(url,options);
textData = extractHTMLText(code);
complete error ( test is my script name ) :
Error using htmlTree (line 67)
Error in XML: xmlns:fb: Empty XML namespace is not allowed
Error in extractHTMLText (line 40)
tree = htmlTree(code);
Error in test (line 12)
textData = extractHTMLText(code)
As you can see , MATLAB has a problem only in the text analysis section of the read web page ( empty namspace error ) . I also checked the " code " variable , which has correctly saved the information of the web page .
Can anyone help me to fix this error ? Thanks .

답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by