I have to store XHTML which is not wellformed e.g.(<img href"tes.jpg">) so there is no closing element for element or self close.
I am using the REST service to store data into database, below is the code:
let $$DocPath:= 'D:\sample\'
for $files in file:children($DocPath)
let $filename := fn:tokenize($files,'\\')[fn:last()]
return
(
db:replace('test',('\content\'||$filename),fn:doc($files),map{'skipcorrupt' : true()}),
admin:write-log(fn:concat('Content ingested', ' ' , $filename))
)
I have used option "skipcorrupt" but it didn't work and I am getting error while ingesting content:
(Line 369): The element type "img" must be terminated by the matching end-tag "".]
Is there any option which I need to configure in the "web.xml" or ".basex" file, please suggest.
Thanks