XMLValidator.
验证XML文件或文本的语法或模式。There are different ways to specify the XML source to be validated:
- 在XML文本字段中输入XML文本,
- 指定包含XML文本的属性Attribute with XML Text范围,
- specifying the attribute that contains the path to XML File, or
- picking the XML file in the XML Filename parameter.
Parameters
XML输入
您在此字段中制作的选择使其成为其相应的参数。
- 使用XML文本的属性:选择包含XML文本的属性。
- XML文件:浏览到XML文件或选择包含XML文件路径的属性。
如果此参数设置为无,则所有功能将通过通过了port.
如果验证类型仅设置为语法或语法和模式,则仅通过语法或语法和模式验证的所有功能都将通过通过了port.
可选地,如果“验证类型”设置为“语法和架构”,则用户可以指定架构位置。它可以指定为包含架构位置或使用文件浏览器选择的属性。但是,如果XML文件引用的模式位于FME中的默认XML模式位置,则不保证在验证中使用指定的模式。
Features with at least one warning or error will be output through theFailedport with a new list attribute added to the features. If the default_xml_erroris the list name, the elements of the list attribute contain the following:
列表属性的元素 | 描述 |
---|---|
_xml_error{}.type | WARNING, ERROR or FATAL ERROR |
_xml_error {}。文件 | the file where the warning or error occurs |
_xml_error{}.line | the line where the warning or error occurs |
_xml_error {}。陈列 | 发生警告或错误的列 |
_xml_error{}.desc | 有关警告或错误的详细信息 |
笔记:列表属性从工作台中的输出架构无法访问,除非首先使用在它们上操作的变压器处理它们,例如list exploder.或者ListConcatenator. All list attribute transformers are displayed in the Contents pane of the Transformer Help under清单. Alternatively,attributeexposer.can be used.
如果是,则可以指定每个功能的最大错误或警告。如果否,则记录每个功能的所有错误和警告。
Specifies the maximum number of errors and warnings reported per feature. If there are more errors than this number, they are not logged.
编辑变压器参数
使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅变压器参数菜单选项.
变压器类别
搜索FME知识中心
搜索有关此变压器的样本和信息FME Knowledge Center.