Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a job to read a XML file and replace just two fields and copy the remaining fields as such and create another xml.
If I use tFileInputxml -> txmlmap -> tAdvanceFileOutputXML , I'm getting the xml generated but with the "<" replaced by "<".
Is there a way to get the XML nodes without the "<" ">"
why are you using both components at the same time?
***tXMLMap and tAdvancedFileOutputXML do almost the same thing.
To better understand the problem take a screenshot of the desired result and the tXMLMap settings
Hi,
I tried to replace with the tFileOutputXML but that doesn't seems to be working . If I check 'incoming record is a document' , getting invalid getdocument() something.
Tried to replace the txmlMap with normal tmap.
Attaching the input and the output recived.
Input file:
<?xml version="1.0" encoding="utf-8"?>
<docload xmlns:hub="http://hub.salmat.com.au" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="http://hub.salmat.com.au" timestamp="2020-09-09T13:53:33" version="">
<AccountType>
<Account>TESTACC</Account>
<Type>SAMPLE</Type>
</AccountType>
<mainacc uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
<docid uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
<index name="1">
<field name="Key1">value1</field>
<field name="Key1_TimeStamp">2020-09-09T13:53:33+1000</field>
<field name="Key2">value1</field>
</index>
<detail>2680076476|A0648AC252994BEDBFB2B20FADB96E4C</detail>
</docid>
<proc1>column1</proc1>
<proc2>MULTI_column1</proc2>
<column1>
<Test>test Messages</Test>
<attachment shared="true" name="attachment1">a.pdf</attachment>
<attachment shared="true" name="attachment2">b.pdf</attachment>
</column1>
<column2>
<Test>test Messages</Test>
</column2>
</mainacc>
</docload>
Output received: <in output the tags are repeated if we use get node.>
<?xml version="1.0" encoding="ISO-8859-15"?>
<docload>
<AccountType><AccountType>
<Account>TESTACC</Account><Type>SAMPLE</Type></AccountType></AccountType>
<mainacc uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
<docid uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
<index><index name="1">
<field name="Key1">value1</field><field name="Key1_TimeStamp">2020-09-09T13:53:33+1000</field><field name="Key2">value1</field></index></index>
</docid>
<proc1><proc1>column1</proc1></proc1>
<proc2><proc2>MULTI_column1</proc2></proc2>
<column1><column1>
<Test>test Messages</Test><attachment shared="true" name="attachment1">a.pdf</attachment><attachment shared="true" name="attachment2">b.pdf</attachment></column1></column1>
<column2><column2>
<Test>test Messages</Test></column2></column2>
</mainacc>
</docload>
Thanks for your help.
Our requirement is to copy the whole xml to output, but change the uuid field alone.
<mainacc uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
<docid uuid="5995B2C6-AE5D-12EB-8529-0242AC130003">
mainacc will be the loop element. And we will have mutiple entries of the mainacc. for every record we need to change the uuid alone.