XML Generator component. This requires Python 3 to be installed. To use this component in KNIME, download it from the below URL and open it in KNIME: Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud
or on-premises – with our brand new NodePit Runner. Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well?
Do you think, the search results could be improved or something is missing?
Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com. Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.
Requires two data feeds. The top input port is the data to be processed. The bottom input port takes a control "script" that describes the output required.
The control feed is a table consisting of 3 columns:
option%%00009%%00009| %%00009 key %%00009| %%00009 value
The option - key pairs are as follows:
header %%00009- Root -%%00009name of the root element
%%00009This is the name to be given to used for the root element of the xml
header%%00009- Row -%%00009name of the primary "record/row" element
%%00009This is the element name to be used for each record/row generated
tag%%00009-
%%00009This is the internal "tag name" that you will use to refer to a
%%00009given tag. Normally it will be the same as the table column,
%%00009but it doesn't have to be.
tag_type -
%%00009This is the type of xml item to be generated for the given
%%00009tagname and is one of the following: group, element, attribute,
%%00009comment.
%%00009An element may itself be a group, but differs from a group in that
%%00009the group does not have any value of its own. The distinction
%%00009between group and element is therefore minor.
parent -
%%00009This indiciates that the given element identified by tagname is
%%00009directly subordinate to the element identified as parent-tagname
%%00009and will therefore be containined within it. Elements will be
%%00009generated on the XML output in the order in which they appear in
%%00009the "parent" commands.
display - tagname - display-name
%%00009This identifies what the actual element name to be output
%%00009for a given tagname will be. It allows you to specify a
%%00009different name to the table column name. By default, the
%%00009element name will be the tagname defined here, if no
%%00009display command is specified.
breakonchange -
%%00009For a group tag outputting repeated data, if breakonchange
%%00009is specified, the repeated data is output within the group
%%00009without repeating all other items from the input table.
%%00009Only when the value of the tag specified by
%%00009has changed does the next row get output.
ifblank%%00009-
%%00009The value to be output if the data for the specified
%%00009tag is blank.
ifzero -
%%00009The value to be output if the data for the specified
%%00009tag is zero
ifmissing -
%%00009The value to be output if the data for the specified
%%00009tag is missing
literal -
%%00009Specify a literal value to be output instead of a column
%%00009name. The value may optionally include other tags inside
%%00009{ } in which case the term literal is a slight misnomer as
%%00009the value output will be dynamic. It may then contain the
%%00009output of one or more other tags. A literal can therefore be
%%00009formed of a number of other tags.
comment -
%%00009Specify a comment value to be output The output will
%%00009be inside comment tags in the generated xml.
%%00009The value may optionally include other tags inside
%%00009{ } in which case the value output will be dynamic.
%%00009It may then contain the%%00009output of one or more other tags.
%%00009Where a comment declaration is used, there should also
%%00009be a tag_type declaration defining this tag as a comment
%%00009tag. A comment declaration where there is no corresponding
%%00009comment tag_type will have no effect and will be ignored.
numeric -
%%00009Explicitly states that the given tag is to be treated
%%00009as numeric.
integer -
%%00009Explicitly states that the given tag is to be treated
%%00009as integer.
hideifmissing -
%%00009States that the tag is not to be output if the data
%%00009value is missing, and in the case of group elements
%%00009that no subordinate elements have been output
hideifblank -
%%00009States that the tag is not to be output if the data
%%00009value is blank, and in the case of group elements
%%00009that no subordinate elements have been output
NOTE THAT THIS IS VERY MUCH BETA (PROTOTYPE)
- FEEL FREE TO USE [AT YOUR OWN RISK] - BUT FEEDBACK WELCOME
@takbb Brian Bates May 7th 2021
---
updated: 2022-11-09 - handle missing data
2022-11-09-rev2 - additional output port returning xml as individual string rowsOptions
Nodes
Extensions
Links
Contact