eclipse解析xml提示错误

在代码种需要用到

import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;

结果提示

Access restriction: The type XMLSerializer is not accessible due to restriction on required library D:\Program Files\Java\jre6\lib\rt.jar

 

解决办法:

window->preferences->java->compiler->Error/Warnings下的Deprecated and restricted API设定"Forbidden reference (access rules)为警告或者跳过即可。

 

 

你可能感兴趣的:(eclipse)