XMLNamespaceDeclarer
Declares missing namespaces in XML documents by matching prefixes from another sample XML file whose namespaces are fully declared.
Input Ports
包含XML文档信息的输入功能。
输出端口
如果输入文档的XML名称空间是固定的且格式正确的,it will be output through this port.
如果某个功能没有格式良好的XML文档,it will be output through this port.
Parameters
XML Input
从下拉列表中选择以启用选择的相应参数:
- Attribute Specifying XML Text/Attribute With XML Text: Once you connect the transformer,choose the attribute that contains XML text.
- xml文件名/xml文件:浏览到xml文件。
- XML Text/XML Text: Opens an XML text editor.
将用作在XML输入文档中声明缺少命名空间的引用的示例XML文件。如果示例文件有多个具有相同前缀但不同URI的命名空间,then the first one will always be used.
XML Output
包含XML输出/XML输出文件的属性:通过在包含XML输出的属性中指定属性名称,可以将已成功处理的XML功能输出到功能属性。或者通过在XML输出文件参数中指定文件的路径来指向文件。
错误和警告列表名称:至少有一个警告或错误的功能将通过Failed添加到功能的新列表属性的端口。如果默认的xml错误是列表名,list属性的元素包含以下内容:
列表属性元素 | Description |
---|---|
_xml_error{}.type | 警告,错误或致命错误 |
_ xml_错误.file | 出现警告或错误的文件 |
_xml_error{}.line | 出现警告或错误的行 |
_ xml_错误.col | the column where the warning or error occurs |
_ xml_错误.desc | the details about the warning or error |
注:列表属性无法从工作台中的输出模式访问,除非首先使用对其进行操作的转换器对其进行处理,如列表爆炸器或列表连接符.所有列表属性转换器都显示在“转换器帮助”下的“内容”窗格中。Lists.Alternatively,AttributeExposer可以使用。
漂亮的印刷
参数指定XML输出是否应使用缩进进行漂亮打印。
This parameter specifies the size of a single indentation.
By default,制表符用于漂亮的打印,使用此参数将选项卡替换为空格。
例子
and the sample XML file:
输出如下:
编辑变压器参数
使用一组菜单选项,可以通过引用工作区中的其他元素来指定变压器参数。More advanced functions,例如高级编辑器和算术编辑器,are also available in some transformers.要访问这些选项的菜单,点击beside the applicable parameter.更多信息,see变压器参数菜单选项.
Transformer Categories
Search FME Knowledge Center
在上搜索有关此变压器的示例和信息FME Knowledge Center.