Jenaを使用してXMLファイルを読み込もうとしています。通常は動作しています。JenaのURLからRDF/XMLを読み取る
final String url = "http://www.bbc.co.uk/nature/life/Human";
Model model = ModelFactory.createDefaultModel();
model.read(url, "RDF/XML");
ただし、段落にbrやリンクが含まれている場合は別のURLを試してみます。それは私にこのエラーを与える。
Exception in thread "main" org.apache.jena.riot.RiotException: [line: 25, col: 6 ] {E202} Cannot have both string data "Great white sharks are at the very top of the marine food chain. Feared as man-eaters, they are only responsible for about 5-10 attacks a year, which are rarely fatal. Great whites are ultimate predators. Powerful streamlined bodies and a mouth full of terrifyingly sharp, serrated teeth, combine with super senses that can detect a single drop of blood from over a mile away. Hiding from a great white isn't an option as they can detect and home in on small electrical discharges from hearts and gills. Unlike most other sharks, live young are born that immediately swim away.
" and XML data <br> inside a property element. Maybe you want rdf:parseType='Literal'.
これはイエナは、私はそれはそれを無視するために何をすべきか、このエラーにhttp://www.bbc.co.uk/nature/life/Great_white_shark
を投げるときに、第2の状況のためのリンクです。