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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using HTML tag on xml file from txmlmap

Hello, I have a XML file with many rows, and in my tXmlMap, I need one rows who contains html

0683p000009LscJ.png

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

 

 

Labels (1)
42 Replies
Anonymous
Not applicable
Author

So I try , Its showing the xml file with the tag, 0683p000009LscQ.png

but I'm using a tFileInputXML and I get the xml file with

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

So I try this one 0683p000009LsNf.png0683p000009LsTO.pngAnd I don't get the <p> tag her

 

I used my XPath query

"my:DATA/my:Description/html"

Idk why it doest work  0683p000009MPcz.png

 

And I think its a little be boring for you... sorry...

Anonymous
Not applicable
Author

Don't use the tFileInputXML for this. You do not need to. Just replace your section of the job which starts with the tFileInputXML component with the components I showed you.

Anonymous
Not applicable
Author

But I have many file (maybe 200 per job execution) and I need to read all file, how can I read all file from my directory ?

Anonymous
Not applicable
Author

I don't understand why this is changing the reading of files? Just replace the section that starts with the tFileInputXML and replace it with the job section I gave you. You are still reading the file, just with a different component.

 

EDIT: Hang on, do you think that 

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

is passing the XML to the component? It isn't. It is passing the file path and name to the component. The component then reads the file.

Anonymous
Not applicable
Author

I used the ((String)globalMap.get("tFileList_1_CURRENT_FILE")) but I got error on tJavaFlex0683p000009Lsjt.png

How the tFileInputRaw can read the all file ?

Anonymous
Not applicable
Author

You are nearly there. Can you show me the tFileInputRaw component config and you might need to check the tConverType_1 settings. You are getting a null value from there

Anonymous
Not applicable
Author

0683p000009Ls6f.png0683p000009Lsdy.png

Anonymous
Not applicable
Author

What code do you have in your tJavaFlex?

 

Also, try putting a tLogRow between the tConvertTYpe and the tJavaFlex. See what is output. You have a a nullpointerexception. It means that an object you are using is null. It's pretty simple to solve, you just need to find out what is null and why

Anonymous
Not applicable
Author

 

I used your code, and I just change the row name 0683p000009LsM2.pngI have a lot of xml file in my directory but the "Besoin.xml" is not, I tried to copie the the file but still read "Besoin.xml"

Anonymous
Not applicable
Author

Hmmmm, I've just realised what this is. I am not sure how your previous file managed to be read. But you need to use ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) rather than ((String)globalMap.get("tFileList_1_CURRENT_FILE"))