尝试在表中打印数据时出现SAXParseException [英] SAXParseException when trying to print data in table

查看:119
本文介绍了尝试在表中打印数据时出现SAXParseException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

引起:org.xml.sax.SAXParseException:cvc-complex-type.2.4.a:找到以元素'jr:table'开头的无效内容。预计会有一个'{http://jasperreports.sourceforge.net/jasperreports\":component}'。

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:table'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.

为什么会出现这种情况?

Why it occurs?

推荐答案

你几乎没有为你的问题提供任何背景,所以你获得有用答案的机会很小。

you provide almost no context for your question, so your chances of getting a helpful answer are slim.

但是,如果您正在解析定义了架构且文档与架构不匹配的xml文档,那么这看起来就像是一种例外。

however, that looks like the sort of exception you would get if you are parsing an xml document with a schema defined and the document does not match the schema.

更新:

根据您在下面的评论,我看到该文档列出了一个架构,所以我的原始猜测仍然有效。你的xml文档与架构不匹配(例如,有一个table元素,架构中应该有一个component元素)。

based on your comment below, i see the document does list a schema, so my original guess still stands. your xml document does not match the schema (e.g. there is a "table" element where the schema says there should be a "component" element).

这篇关于尝试在表中打印数据时出现SAXParseException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆