One Star

Problem converting XML with multiple loop

Hello,
I have problems with converting one XML to another with difference structure.
If you know LCI data format, im converting difference data format (from Ecospold to ILCD) which is the two of them using XML as data format.
here what is look like in simple way:
from this:
<processDataSet xmlns="http://lca.jrc.it/ILCD/Process" xmlns:common="http://lca.jrc.it/ILCD/Common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metaDataOnly="false" locations="../ILCDLocations.xml" version="1.1" xsi:schemaLocation="http://lca.jrc.it/ILCD/Process ../../schemas/ILCD_ProcessDataSet.xsd">
<processInformation>
<dataSetInformation>
<common:UUID>9ca9d601-15b7-45c3-84ad-e46f9a165809</common:UUID>
<name>
<baseName xml:lang="en">electricity, black coal NSW, sent out</baseName>
</name>
<classificationInformation>
<common:classification name="ILCD">
<common:class classId="97817215-b35b-4f6a-be0c-3e1d3060cd77" level="0">AusLCI</common:class>
<common:class classId="08a91a3d-a459-49a4-8733-8eccefe718e9" level="1">Electricity by fuel</common:class>
<common:class classId="c14a92aa-e126-4549-86fe-1c6f32ed57e6" level="2">Coal</common:class>
</common:classification>
</classificationInformation>
<common:generalComment xml:lang="en">Black coal based power generation in NSW for the year 2007-08. Based on power sent out therefore taking no account of transmission losses.</common:generalComment>
</dataSetInformation>
<quantitativeReference type="Reference flow(s)">
<referenceToReferenceFlow>0</referenceToReferenceFlow>
</quantitativeReference>
<time>
<common:referenceYear>2007</common:referenceYear>
<common:dataSetValidUntil>2008</common:dataSetValidUntil>
<common:timeRepresentativenessDescription xml:lang="en">Based year for the data is 2007-08</common:timeRepresentativenessDescription>
</time>
<geography>
<locationOfOperationSupplyOrProduction latitudeAndLongitude="0.0,0.0" location="AU">
<descriptionOfRestrictions xml:lang="en">New South Wales, Australia</descriptionOfRestrictions>
</locationOfOperationSupplyOrProduction>
</geography>
<technology>
<technologyDescriptionAndIncludedProcesses xml:lang="en">Current</technologyDescriptionAndIncludedProcesses>
</technology>
</processInformation>
<modellingAndValidation>
<LCIMethodAndAllocation>
<typeOfDataSet>Unit process, black box</typeOfDataSet>
</LCIMethodAndAllocation>
<dataSourcesTreatmentAndRepresentativeness>
<referenceToDataSource refObjectId="0f62aa58-d5ca-4e07-87c1-d061a34bb9ff" type="source data set" uri="../sources/0f62aa58-d5ca-4e07-87c1-d061a34bb9ff_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Unknown 2011</common:shortDescription>
</referenceToDataSource>
<referenceToDataSource refObjectId="0561c8f6-6045-4e1f-9f40-80e35f5b2686" type="source data set" uri="../sources/0561c8f6-6045-4e1f-9f40-80e35f5b2686_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Department of Climate Change and Energy Efficiency. 2009</common:shortDescription>
</referenceToDataSource>
<referenceToDataSource refObjectId="4c26275c-6390-469c-8b35-766a39fe7816" type="source data set" uri="../sources/4c26275c-6390-469c-8b35-766a39fe7816_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Smart, A. and Aspinall, A. 2009</common:shortDescription>
</referenceToDataSource>
<referenceToDataSource refObjectId="c4f77cdb-4eb8-48f4-b09f-9d99658e41d9" type="source data set" uri="../sources/c4f77cdb-4eb8-48f4-b09f-9d99658e41d9_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Electricity Supply Association of Australia. 2009</common:shortDescription>
</referenceToDataSource>
</dataSourcesTreatmentAndRepresentativeness>
</modellingAndValidation>
<administrativeInformation>
<dataGenerator>
<common:referenceToPersonOrEntityGeneratingTheDataSet refObjectId="c5d19c1f-6746-4909-b5f6-1c571b973cce" type="contact data set" uri="../contacts/c5d19c1f-6746-4909-b5f6-1c571b973cce_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Tim Grant</common:shortDescription>
</common:referenceToPersonOrEntityGeneratingTheDataSet>
</dataGenerator>
<dataEntryBy>
<common:timeStamp>2011-03-05T17:22:05.000+11:00</common:timeStamp>
<common:referenceToDataSetFormat refObjectId="a97a0155-0234-4b87-b4ce-a45da52f2a40" type="source data set" uri="../sources/ILCD_Format_a97a0155-0234-4b87-b4ce-a45da52f2a40_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">ILCD Format</common:shortDescription>
</common:referenceToDataSetFormat>
<common:referenceToPersonOrEntityEnteringTheData refObjectId="c5d19c1f-6746-4909-b5f6-1c571b973cce" type="contact data set" uri="../contacts/c5d19c1f-6746-4909-b5f6-1c571b973cce_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">Tim Grant</common:shortDescription>
</common:referenceToPersonOrEntityEnteringTheData>
</dataEntryBy>
<publicationAndOwnership>
<common:dateOfLastRevision>2011-03-05T17:22:05.000+11:00</common:dateOfLastRevision>
<common:dataSetVersion>01.00.000</common:dataSetVersion>
<common:copyright>true</common:copyright>
<common:accessRestrictions xml:lang="en">All information can be accessed by everybody.</common:accessRestrictions>
</publicationAndOwnership>
</administrativeInformation>
<exchanges>
<exchange dataSetInternalID="0">
<referenceToFlowDataSet refObjectId="3e157525-7570-45e5-9cb8-ebc7586aaf9a" type="flow data set" uri="../flows/3e157525-7570-45e5-9cb8-ebc7586aaf9a_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">electricity, black coal NSW, sent out</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Output</exchangeDirection>
<meanAmount>3355.2000000000003</meanAmount>
<resultingAmount>3355.2000000000003</resultingAmount>
</exchange>
<exchange dataSetInternalID="1">
<referenceToFlowDataSet refObjectId="603c6d99-9568-4651-80ea-176e4755ba28" type="flow data set" uri="../flows/603c6d99-9568-4651-80ea-176e4755ba28_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">tap water, at user/RER S/AU electricity</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Input</exchangeDirection>
<meanAmount>1220.0</meanAmount>
<resultingAmount>1220.0</resultingAmount>
</exchange>
<exchange dataSetInternalID="2">
<referenceToFlowDataSet refObjectId="6fafe491-fc2f-4b68-a508-8fa4b44feaa8" type="flow data set" uri="../flows/6fafe491-fc2f-4b68-a508-8fa4b44feaa8_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">hard coal power plant, 500MW</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Input</exchangeDirection>
<meanAmount>1.94E-9</meanAmount>
<resultingAmount>1.94E-9</resultingAmount>
</exchange>
<exchange dataSetInternalID="3">
<referenceToFlowDataSet refObjectId="780ff3ff-7518-48c9-84ed-e32488cf00a3" type="flow data set" uri="../flows/780ff3ff-7518-48c9-84ed-e32488cf00a3_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">black coal, NSW, at mine</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Input</exchangeDirection>
<meanAmount>422.0</meanAmount>
<resultingAmount>422.0</resultingAmount>
</exchange>
<exchange dataSetInternalID="4">
<referenceToFlowDataSet refObjectId="c75a05b3-adbf-4f76-ab81-7d7b7436f36e" type="flow data set" uri="../flows/c75a05b3-adbf-4f76-ab81-7d7b7436f36e_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">light fuel oil, at regional storage</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Input</exchangeDirection>
<meanAmount>0.411</meanAmount>
<resultingAmount>0.411</resultingAmount>
</exchange>
<exchange dataSetInternalID="5">
<referenceToFlowDataSet refObjectId="39870292-e9b9-41c3-b786-e64e769218a5" type="flow data set" uri="../flows/39870292-e9b9-41c3-b786-e64e769218a5_01.00.000.xml" version="01.00.000">
<common:shortDescription xml:lang="en">transport, freight, rail, diesel</common:shortDescription>
</referenceToFlowDataSet>
<exchangeDirection>Input</exchangeDirection>
<meanAmount>3.24</meanAmount>
<resultingAmount>3.24</resultingAmount>
</exchange>
to this and vice versa:
<ecoSpold xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.EcoInvent.org/EcoSpold01" xsi:schemaLocation="http://www.EcoInvent.org/EcoSpold01 http://www.EcoInvent.org/EcoSpold01..\..\EcoSpold01Dataset.xsd">
<dataset validCompanyCodes="CompanyCodes.xml" validRegionalCodes="RegionalCodes.xml" validCategories="Categories.xml" validUnits="Units.xml" number="6" timestamp="2011-03-05T17:22:05" generator="SimaPro 7.2">
<metaInformation>
<processInformation>
<referenceFunction datasetRelatesToProduct="true" name="electricity, black coal NSW, sent out " localName="electricity, black coal NSW, sent out " infrastructureProcess="false" amount="0.932" unit="MWh" category="Electricity by fuel" subCategory="Coal" localCategory="Electricity by fuel" localSubCategory="Coal" generalComment="Black coal based power generation in NSW for the year 2007-08. Based on power sent out therefore taking no account of transmission losses." infrastructureIncluded="false"/>
<geography location="AU" text="New South Wales, Australia"/>
<technology text="Current"/>
<timePeriod dataValidForEntirePeriod="true" text="Based year for the data is 2007-08">
<startDate>2007-07-01</startDate>
<endDate>2008-06-30</endDate>
</timePeriod>
<dataSetInformation type="1" impactAssessmentResult="false" timestamp="2011-03-05T17:22:05" version="0.90" internalVersion="0.0" energyValues="0" languageCode="en" localLanguageCode="de"/>
</processInformation>
<modellingAndValidation>
<representativeness/>
<source number="1" sourceType="0" firstAuthor="Unknown" year="2011" title="Australia's Mining Series 2006" placeOfPublications="Unspecified"/>
<source number="2" sourceType="0" firstAuthor="Department of Climate Change and Energy Efficiency." additionalAuthors="" year="2009" title="Department of Climate Change and Energy Efficiency, (2009)" titleOfAnthology="Australian National Greenhouse Accounts, National Inventory Report 2008 Volume 1," publisher="Commonwealth of Australia" placeOfPublications="Canberra" text="Electronic source."/>
<source number="3" sourceType="0" firstAuthor="Smart, A. and Aspinall, A." additionalAuthors="" year="2009" title="Smart, A. and Aspinall, A., (2009)" titleOfAnthology="Water and the electricity generation industry ? Implications of use, Waterlines Report Series No.18, ," publisher="National Water Commission" placeOfPublications="Canberra" text="Electronic source."/>
<source number="4" sourceType="0" firstAuthor="Electricity Supply Association of Australia." additionalAuthors="" year="2009" title="Electricity Supply Association of Australia, (2009)" titleOfAnthology="Electricity Gas Australia 2009," publisher="Electricity Supply Association of Australia" placeOfPublications="Melbourne," text="Electronic source."/>
</modellingAndValidation>
<administrativeInformation>
<dataEntryBy person="2" qualityNetwork="1"/>
<dataGeneratorAndPublication person="3" dataPublishedIn="2" referenceToPublishedSource="1" accessRestrictedTo="0" copyright="true"/>
<person number="2" name="Tim Grant" address="Unknown" telephone="0061 408104977" email="tim@lifecycles.com.au" companyCode="LCS" countryCode="AU"/>
<person number="3" name="Tim Grant" address="Unknown" telephone="0061 408104977" email="tim@lifecycles.com.au" companyCode="LCS" countryCode="AU"/>
</administrativeInformation>
</metaInformation>
<flowData>
<exchange number="1" name="electricity, black coal NSW, sent out " location="AU" unit="MWh" meanValue="0.932" generalComment="93.21% of generated electricity sent out into grid due to 6.79% house load inferred from ESAA 2009 " infrastructureProcess="false">
<outputGroup>0</outputGroup>
</exchange>
<exchange number="2" name="tap water, at user/RER S/AU electricity" location="AU U " unit="kg" meanValue="1220" uncertaintyType="0" generalComment="Water may be self extracted but likely to need some treatment so local water supply process is used" infrastructureProcess="false">
<inputGroup>5</inputGroup>
</exchange>
<exchange number="3" name="hard coal power plant, 500MW" location="GLO" unit="p" meanValue="1.94E-9" uncertaintyType="1" standardDeviation95="3" generalComment="Data is from ecoinvent unmodified." infrastructureProcess="true">
<inputGroup>5</inputGroup>
</exchange>

im using the data from AusLCI as the simulation for my actual research later
My problem is if i use advancefileoutputXML, i cant do multiple looping. But, if i use fileoutputMSXML, it cant exactly copied the structure of targeted XML (i cant produce empty attribute, the element are difference with the imported XML). oh, and im doint his by separate the XML into several parts and combine it later in the output.
Can you give me the suggestion of how to solve my problem. sorry for my bad english and tell me if you did not understand enough of the problems


Best Regards

rocknrolla
14 REPLIES
One Star

Re: Problem converting XML with multiple loop

Hi Rocknrolla
I try to reproduce the job you mentioned above.
But I find that the format of these two xml files are not correct.
Could you simplify the structure of them?
Did you check "Create empty element if needed" in tFileOutputMSXml->Advanced Settings?
Moreover, since TOS 5.1.0, tXMLMap supports multiple loop feature.
Regards,
Pedro
One Star

Re: Problem converting XML with multiple loop

Hi Rocknrolla
I try to reproduce the job you mentioned above.
But I find that the format of these two xml files are not correct.
Could you simplify the structure of them?
Did you check "Create empty element if needed" in tFileOutputMSXml->Advanced Settings?
Moreover, since TOS 5.1.0, tXMLMap supports multiple loop feature.
Regards,
Pedro

hello, thx for the quick respond
Its not correct because it is not the actual file, edit: i cant upload it because it is too long and the forum not allowing me to post it all
i check the tFileOutputMSXml component file, edit: and i already check create empty element if needed but the empty element from the imported xml structure wont showed up
and how to use tXMLMap to use multiple loop? and can it connected with file output XML with the same structure, i mean the XML tree in the file output is difference right?
i use TOS 5.0.2 i think i should upgrade it
One Star

Re: Problem converting XML with multiple loop

Hi
Could you send me an email and attach these two xml?
Because without reproducing this issue, I can not point out how to fix it.
Regards,
Pedro
One Star

Re: Problem converting XML with multiple loop

Hi
Could you send me an email and attach these two xml?
Because without reproducing this issue, I can not point out how to fix it.
Regards,
Pedro

i will email it
also can you explain how to use tXMLmap+tAdvanceFileOutputXML combined?

thanks
One Star

Re: Problem converting XML with multiple loop

Hi
When using tFileOutputMSXML, if an attribute gets null values, this attribute will disappear in output XML file.
It seems to be a bug. Please report it on BugTracker.
When using tXMLMap, it works fine.
So now the workaround is to use tXMLMap.
Just link tXMLMap with tFileOutputDelimited which has only one 'Document' column.
The file name of tFileOutputDelimited should be *.xml.
Regards,
Pedro
One Star

Re: Problem converting XML with multiple loop

Hi
When using tFileOutputMSXML, if an attribute gets null values, this attribute will disappear in output XML file.
It seems to be a bug. Please report it on BugTracker.
When using tXMLMap, it works fine.
So now the workaround is to use tXMLMap.
Just link tXMLMap with tFileOutputDelimited which has only one 'Document' column.
The file name of tFileOutputDelimited should be *.xml.
Regards,
Pedro

i had use your methods, at first it is okay. Little mess at the structure but is is not a problem, i can produce null attribute. But, when i apply some loop, the problem start
the looping is applied on whole XML, so if there is next loop applied the whole XML is written and so on.
One Star

Re: Problem converting XML with multiple loop

Hi
The "all in one" feature can be found in tXmlMap Settings which supports generating multi rows into one xml row as the following image.
Regards,
Pedro
One Star

Re: Problem converting XML with multiple loop

Hi
The "all in one" feature can be found in tXmlMap Settings which supports generating multi rows into one xml row as the following image.
Regards,
Pedro

its working now Smiley Happy
thanks a lot
One Star

Re: Problem converting XML with multiple loop

Hi
The "all in one" feature can be found in tXmlMap Settings which supports generating multi rows into one xml row as the following image.
Regards,
Pedro

Hello,
it turns out my problem is not solve yet
The xml is looping, the file is produce all is good, but the my main problems which is multiple loop still cant be done. i tried with multiple loop using TOS 5.1 as you suggested but when i applied it, it produce nothing.
for your information, i separate the input from same XML files and combined it later in the XMLmap. are my method is incorrect?
as you can see on the picture below, i separate the file and it produce 73 rows in elecNSW_3 and 4 rows in elecNSW_4. but only 1 row in the output.
One Star

Re: Problem converting XML with multiple loop

Hi,
Another approach is to use a set of tAdvancedFileOutputXML components in append mode. Take a look at the "Multiple Loops" section of this post.
You may also find it easier to integrate the source data into an RDBMS (including ones like MS Access) and write a denormalized query that will be the basis for your XML generation.
http://bekwam.blogspot.com/2011/09/xml-output-from-multiple-data-sources.html
One Star

Re: Problem converting XML with multiple loop

Hi,
Another approach is to use a set of tAdvancedFileOutputXML components in append mode. Take a look at the "Multiple Loops" section of this post.
You may also find it easier to integrate the source data into an RDBMS (including ones like MS Access) and write a denormalized query that will be the basis for your XML generation.
http://bekwam.blogspot.com/2011/09/xml-output-from-multiple-data-sources.html

hi, thanks for responding to my problem
i look at your blog and i dont quite understand how append mode works. is it we must put relationship between difference loop or we can simply add row with difference row after we finish previous subjob?
in my case i tried to loop the element that need loop one after another, and it didnt work
the error was like this:
org.dom4j.DocumentException: Error on line 3 of document file:///I:/SGU%20Material/Semester%208/Thesis/ETL%20Tool/LCI%20Data/appendxmltest.xml : The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "ecoSpold" is not bound. Nested exception: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "ecoSpold" is not bound.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_2Process(AppendXML.java:2312)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_1Process(AppendXML.java:1797)
at lcidataconverterprototype.appendxml_0_1.AppendXML.runJobInTOS(AppendXML.java:3833)
at lcidataconverterprototype.appendxml_0_1.AppendXML.main(AppendXML.java:3701)
Nested exception:
org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "ecoSpold" is not bound.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_2Process(AppendXML.java:2312)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_1Process(AppendXML.java:1797)
at lcidataconverterprototype.appendxml_0_1.AppendXML.runJobInTOS(AppendXML.java:3833)
at lcidataconverterprototype.appendxml_0_1.AppendXML.main(AppendXML.java:3701)
Nested exception: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "ecoSpold" is not bound.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_2Process(AppendXML.java:2312)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_1Process(AppendXML.java:1797)
at lcidataconverterprototype.appendxml_0_1.AppendXML.runJobInTOS(AppendXML.java:3833)
at lcidataconverterprototype.appendxml_0_1.AppendXML.main(AppendXML.java:3701)
Exception in component tAdvancedFileOutputXML_2
java.lang.Exception: can not find the file:I:/SGU Material/Semester 8/Thesis/ETL Tool/LCI Data/appendxmltest.xml
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_2Process(AppendXML.java:2318)
at lcidataconverterprototype.appendxml_0_1.AppendXML.tFileInputXML_1Process(AppendXML.java:1797)
at lcidataconverterprototype.appendxml_0_1.AppendXML.runJobInTOS(AppendXML.java:3833)
at lcidataconverterprototype.appendxml_0_1.AppendXML.main(AppendXML.java:3701)
i dont quite understand because im new on talend Smiley Happy
One Star

Re: Problem converting XML with multiple loop

Hi Rocknrolla
I encounter an interesting thing that when I create this job by using tFileOutputMSXML, it works fine this time. The attributes with null values don't disappear this time.
Could you tell me the steps to reproduce this issue you mentioned at Comment #1?
Regards,
Pedro
One Star

Re: Problem converting XML with multiple loop

Hi Rocknrolla
I encounter an interesting thing that when I create this job by using tFileOutputMSXML, it works fine this time. The attributes with null values don't disappear this time.
Could you tell me the steps to reproduce this issue you mentioned at Comment #1?
Regards,
Pedro

Sure,
1. i divide the xml file by creating 4 different inputXML (in this step i convert AUSLCI_Elec_Beta0_9BCPowerQLD.XML to 9ca9d601-15b7-45c3-84ad-e46f9a165809_01.00.000.xml) each inputXML serve for 4 different element which are, processinformation, modelling and validation, administrativeinformation and exchange)
2. then, i assign each input XML into tMapComponent which i mapped every metadata to another (some with modification
3. last, i assign all of this into tFileOutputMSXML
4. in tFileOutputMSXML, i import XML tree from 9ca9d601-15b7-45c3-84ad-e46f9a165809_01.00.000.xml, all for four of them (tFileOutputMSXML ask for four XML tree). but, i only using the element that the XML assign for, means i assign the previous mapped input for exchange into imported XML tree with only exchange element and deleted the rest. i only keep several attribute outside that four elements
ps: in the advance setting i check the option for create directory if not exists, create empty element if needed, trim the whitespace charactes and escape test
One Star

Re: Problem converting XML with multiple loop

hello pedro,
have you found the problem yet?