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>
Hi,
if you take a look at the error message you could find the solution: Your xml must start end end with the same tag. So you should add a opening tag at the start "<data>" for example and a closing one at the end "</data>" in this case.
Additional you should add a header in the first line like the following:
<?xml version="1.0" encoding="iso-8859-1"?>
You could find more information for example on:
Wikipedia.
Bye
Volker
hi,
i verif structure of my xml message
it is good
but i have always 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.v1toxml_0_1.v1toxml.tFileInputFullRow_1Process(v1toxml.java:1356)
i think that the flux xml it isn't in one row but in several rows
when tParseXMLRow_1 parse the first row i see the start entity but i don't see the end entity because the end entity is on another row
do i make concat each row in one row ?
or is it a mistake to think that ?
thank for your help !
hi,
when i read my structure xml with tInputFileXML in logout i can extract the attritbut of element
it 's good
but when i parse the stream with component tParseXMLRow_1
i have always Exception
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.v1toxml_0_1.v1toxml.tFileInputFullRow_1Process(v1toxml.java:1356)
why i can't use component tParseXMLRow_1
+
my input is in first a file i transform this file in xml file with tFileinputFullRow + tJavaRow after i use tparseXMLrow for extract XML data in an attribute of flow it doesn't work because xml message spread over multiple rows how can i do to extract XML data in an attribute ? ++