Hi,
I am having a problem ordering child nodes within a parent node through the XML Writer.
For example.
If I have a parent node...
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<ISBN>123456789</ISBN>
</Book>
Child node...
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
I need to add a child node which I am able to do into the node, however I need to have the order in a particular sequence due to schemas.
The Child node needs to appear in between certain tags of the parents.
This is what I would like to have...
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
<ISBN>123456789</ISBN>
</Book>
This is currently what Clover XML Writer produces.
Clover puts the child node at the bottom of the parent node.
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<ISBN>123456789</ISBN>
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
</Book>
Is there anyway to do this?
Is there anyway to control the sequencing within the XML Writer?
Thanks
I am having a problem ordering child nodes within a parent node through the XML Writer.
For example.
If I have a parent node...
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<ISBN>123456789</ISBN>
</Book>
Child node...
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
I need to add a child node which I am able to do into the node, however I need to have the order in a particular sequence due to schemas.
The Child node needs to appear in between certain tags of the parents.
This is what I would like to have...
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
<ISBN>123456789</ISBN>
</Book>
This is currently what Clover XML Writer produces.
Clover puts the child node at the bottom of the parent node.
<Book>
<Title>Snow White</Title>
<Author>Walt Disney</Author>
<ISBN>123456789</ISBN>
<Library>
<Location>London</Location>
<Location>Manchester<Location>
</Library>
</Book>
Is there anyway to do this?
Is there anyway to control the sequencing within the XML Writer?
Thanks
-
Hi Mike,
it's not possible to change order of elements in current version.
Anyway, you may use XSL transformer component
http://wiki.cloveretl.org/doku.php?id=c ... sformation
for post-processing XML file.
Create next phase in your graph and put XSL transformer into it.
Don't connect any edges to in/out ports, just set attributes xmlInputFile(the same as output of XmlWriter) and xmlOutputFile.
Regards,
Martin Varecha
Please sign in to leave a comment.
Comments 1