XMLAPPEND
将几个XML文档组合成一个。
变压器有两个输入端口,one accepting a single XML document,另一个接受多个XML片段。
默认情况下,xmlAppender的工作原理是将每个传入的XML片段插入到主XML文档的末尾。这个在文档中附加路径and将片段附加为参数可用于控制片段插入文档的位置。
输入端口
Input features containing the main XML document.
包含XML片段的输入功能。
输出端口
这是带有附加片段的主XML文档的输出。
Multiple main documents are allowed only if the小组通过parameter is used,否则,将通过此端口输出重复的主文档。当主文档的组合值为小组通过key equal.
没有对应的片段小组通过main XML document are output via this port.
参数
Transformer
使用此参数将多个主文档和片段组织成组。当复合XML文档小组通过关键不同。未使用的文件和碎片,没有相应钥匙的,路由到未使用的文档and未用碎片端口,respectively.
Note:How parallel processing works with FME: see关于并行处理for detailed information.
此参数确定Transformer是否应跨并行进程执行工作。如果启用了,将为指定的每个组启动一个进程GroupByparameter.
Parallel Processing Levels
Parameter | 进程数 |
---|---|
No Parallelism | 1 |
极小值 | 岩心The processor,or CPU,是执行数学计算的计算机的物理部分。它是计算机系统中最重要的部分。Traditional processors have only one core on the processor,意思是在任何给定的时间,only one set of calculations is being performed.If a processor is dual-core,这意味着单芯片包含两个处理器的硬件,现在称之为核心,以区别于单芯片,running simultaneously,并排。(资料来源:http://www.ehow.com/facts_5730257_computer-core-processors_u.html)2 |
Moderate | 核心的确切数量 |
Aggressive | cores x 1.5 |
极端 | 核心X 2 |
例如,在四核机器上,最小的并行性将导致两个同时的FME过程。8核机器上的极端并行性将导致16个同步进程。
You can experiment with this feature and view the information in the Windows Task Manager and the Workbench Log window.
是的: This transformer will process input groups in order.更改的值小组通过输入流上的参数将触发对当前累积组的批处理。如果群体较大/复杂,这将提高整体速度,but could cause undesired behavior if input groups are not truly ordered.
不: This is the default behavior.只有当所有输入都存在时,处理才会在此变压器中进行。
XML文档
从列表中选择将启用该选择的相应参数:
- Attribute with XML Document: Choose the attribute containing the main XML document.
- XML文档文件名:浏览到XML文件。
此参数控制片段相对于选定或匹配元素插入文档的方式。The possible values for the parameter are:
- 前一个孩子
- Succeeding Children
- 之前的兄弟姐妹
- Succeeding Siblings
应了解与所选或匹配元素相关的值,由在文档中附加路径parameter.
此参数的默认值为Succeeding Children.
此参数指定单个元素,or a path to a single element,在文档中。路径中的每个元素都由正斜杠分隔,'/'。A wildcard,“*”也可以用作元素的前缀或本地名称,例如。,*:‘p:*',或者只是‘*’,which translates to ‘*:*'.
参数的默认值是空字符串。这将匹配或选择根元素。
请考虑以下XML文档:
在
1)指定在文档中附加路径作为“数据/初始化”,and
2)Set将片段附加为到Succeeding Siblings
或:
1)指定在文档中附加路径作为“数据/终结”,and
2)Set将片段附加为到之前的兄弟姐妹
XML片段
从列表中选择将启用该选择的相应参数:
- 带XML片段的属性:选择包含XML片段的属性。
- XML片段文件名:浏览到XML文件。
XML Output
从列表中选择将启用该选择的相应参数:
- 带xml output的属性:选择保存附加结果的属性。
- XML输出文件:指定包含附加结果的文件。
This parameter is used to select the encoding for the appended results.
漂亮的印刷
The parameter specifies if the XML output should be pretty-printed with indentation.
此参数指定单个缩进的大小。
默认情况下,the tab character is used for pretty printing,use this parameter to replace the tabs with spaces.
默认情况下,标记中的文本保持不变。If this parameter is set to是的,the text will be pretty printed.If a tag contains both a text value element and another nested tag element,文本值或嵌套标记的第二个将不会很好地打印出来。下面的示例显示了左侧的一块XML代码,以及右侧漂亮的打印输出。
例子 | 印刷精美 |
---|---|
|
|
文本值 |
文本值#文本值是第一个元素 |
|
|
一些价值 |
一些价值 |
编辑变压器参数
Using a set of menu options,可以通过引用工作区中的其他元素来指定变压器参数。更高级的功能,such as an advanced editor and an arithmetic editor,也可用于一些变压器。To access a menu of these options,click在适用参数旁边。更多信息,看见变压器参数菜单选项.
变压器类别
搜索FME知识中心
Search for samples and information about this transformer on theFME知识中心.