Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have a XML file with many rows, and in my tXmlMap, I need one rows who contains html
In this rows, I use the html tag in my tXmlMap, but he stop read at the first line and talend send me error
ORA-01400: Cannot insert NULL into ("DB"."table"."column")
But, other xml file with many html rows , its working for exemple, after my <p> Hello, </p> I press enter to make a new line, its working
Edit: I tried to use this
StringHandling.EREPLACE(row2.html,"</p>","</p><br>")
but nothing
You're not using XML. XML and HTML are similar but are not interchangeable. If you want to parse HTML, you will need to use third party Java APIs. I have written a tutorial on how this can be done here: https://www.rilhia.com/tutorials/using-third-party-java-library-scrape-content-table-web-page
when I press space between
<my:Description><html xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve"> <p>
my html tag and <p> tag its work fine, but the file comes with no space and I can't edit file (The job insert the data in db)
What error are you getting? The actual error in the output window in full.
This is from normal xml file without the space between ><p>
and
this is when i put space between ><p>
This is a nasty file to work with. I don't believe it is well formed at all....but then Microsoft seldom conform to standards. The "my" is not bound....was the file you sent me edited? Anyway, after removing the broken XML I was able to get the following XPath to work with or without a space between html and <p> ....
"./DATA/Description/html/p"
I was using just a tFileInputXML and had "/WebFORM" as the Loop XPath query.
Hi and thx for reply, so yes I upload a new file, sorry I edited the old file.
I don't use the XPath "./DATA/Description/html/p" because I have other XML file with many tag like this and its show me only the first <p> tag , "Bonjour," and not all tag, and I used "./DATA/Description//*" to read all line in description
Using your new file (it is still missing a namespace for "my", but I added a dummy one), I was able to return .....
<html xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve"><p>Bonjour,</p> <p>Je vous remercie de bien vouloir renommer le répertoire Solidarités par Actions Solidaires qui se trouve sur H, direction des Solidarités et de la Santé Publique.</p> <p>Cordialement</p> <p>Stest </p></html>
....using an XPath of "./myATA/my
escription/html" and keeping "Get Nodes" ticked. By unticking "Get Nodes" I get .....
Bonjour, Je vous remercie de bien vouloir renommer le répertoire Solidarités par Actions Solidaires qui se trouve sur H, direction des Solidarités et de la Santé Publique. Cordialement Stest
Is this not what you want?
Did the above work?
Hey, sorry for late reply ( time difference maybe ) So I tried again the XPath
"/my:DATA/my:Description/html"
But it still return me all the html in my xml file, its Ok
But ther is not returning html on file with only one <p> tag like this file !