Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

parse flux xml

i have a file
i transform this file in xml file
with tFileinputFullRow + tJavaRow
it's ok
now i would like extract a attribut of a element
i want to use tparseXMLrow
but i have a exception in component tParseXMLRow_1
org.dom4j.DocumentException: Error on line 1 of document : XML document structures must start and end within the same entity. Nested exception: XML document structures must start and end within the same entity.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at talenddemosjava.xmltovtg_0_1.xmltovtg.tMysqlInput_1Process(xmltovtg.java:575)
how do i make ?
thank a lot for your help !
xml structure is
<A>
<B>
</B>
<C>
<data ct="hhh" ></data>
<data ct="hhh" ></data>
</C>
</A>
Labels (4)
15 Replies
Anonymous
Not applicable
Author

You could use tDenormalize no concatenate multiple rows together. Use "\n" as delimiter. you need a unique key over all rows for the whole xml document. If you do not have one (or the file has only one xml document) you could a fix value in one additional attribute inside of your tJavaRow.
Anonymous
Not applicable
Author

i don't understand how i use tDenormalize
can you give me a example, please ?
++
Anonymous
Not applicable
Author

the file has only one xml document , the xml message spread over multiple rows
i have only a column where is spreaded the xml message
how i use tDenormalize
++
Anonymous
Not applicable
Author

I made an example. Take a look at the pictures. There are two jobs. The difference is in the input row delimiter. The upper one uses "---" (which is never used in the xml) and loads the whole file in one row. The second one uses "\n" as delimiter and need to merge the rows together with a tDenormalize.
I modified the input:
<?xml version="1.0" encoding="iso-8859-1"?>
<document>
<A>
<B>
</B>
<C>
<data ct="hhh" >First</data>
<data ct="iii" >Second</data>
</C>
</A>
</document>

And this is the output (both the same one):
ct;value
hhh;First
iii;Second

Bye
Volker
Anonymous
Not applicable
Author

thanks a lot of for your help
++
Anonymous
Not applicable
Author

You are welcome!