Error in XML : Empty XML namespace is not allowed

11 ビュー (過去 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 Center および File ExchangeString Parsing についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by