perl Validator for XML [英] perl Validator for XML

查看:64
本文介绍了perl Validator for XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用CPAN提供的perl验证器程序来验证xml

(.xml)对XML架构(.xsd)。


验证程序工作正常,所有模块安装正确。

我用很多例子检查过它。


但是现在我正在使用组模式文件中的XML模式的元素,以及

我收到下面给出的错误,


无法识别的元素''< group>''找到。

Hi ,
I am using the perl validator program given at CPAN for validation of xml
(.xml) against XML schema(.xsd).

The validator program is working fine with all modules installed correctly.
I checked it with many examples.

But now I am using the "group" element of XML schema, in schema file, and
I am getting error given below,

unrecognized element ''<group>'' found.

推荐答案




我正在使用CPAN提供的perl验证器程序进行验证xml

(.xml)对XML模式(.xsd)。


验证器程序在正确安装所有模块的情况下工作正常。

我用很多例子检查了它。


但现在我使用的是组。模式文件中的XML模式元素,以及

我收到下面给出的错误,


找不到无法识别的元素''< group>''。
Hi ,
I am using the perl validator program given at CPAN for validation of xml
(.xml) against XML schema(.xsd).

The validator program is working fine with all modules installed correctly.
I checked it with many examples.

But now I am using the "group" element of XML schema, in schema file, and
I am getting error given below,

unrecognized element ''<group>'' found.



您能否发布您的代码(代码标签),您用于验证的模块名称以及数据样本(包括违规元素) )?


谢谢!


问候,


杰夫

Could you please post your code(in code tags), the name of the module you are using for validation, and a sample of the data (including the offending element)?

Thanks!

Regards,

Jeff

在开始时,即在下面perl文件中给出的行中发生错误,
At the start, i.e at line given below in perl file the error is occuring,


validator = XML :: Validator :: Schema-> new( file =>''/ xml2c / test1 / test_1.xsd'');


错误写在下面给出的文件中,

包XML: :Validator :: Schema :: Parser;


,其中没有检查group元素..

所以在最后一个else循环中,解析器因上面提到的错误而失败..



perl验证器程序文件是:
validator = XML::Validator::Schema->new(file => ''/xml2c/test1/test_1.xsd'');

The error is written in file given below,
package XML::Validator::Schema::Parser;

where there is no check for "group" element ..
So at the last else loop the parser is failed with the error mentioned above ..


The perl validator program file is :
展开 | 选择 | Wrap | 行号


这篇关于perl Validator for XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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