Page 1 of 1

document is not properly loading without xml declaration

Posted: Fri Jun 02, 2023 12:57 pm
by shikhar_472
Hi Team,
We are not able to load the XMl document properly if xml tag declaration is missing
<?xml version="1.0" encoding="UTF-8"?>

is there any way to work on xml document in a proper way in which this declration is missing because we have 2.5 millions of data in database where xml tag declaration is missing updating all of them manually to load in oxygen is critical so is there any chance that oxygen can accept and work properly on XML document without xml tag.

Thanks,
Shikhar.

Re: document is not properly loading without xml declaration

Posted: Sun Jun 04, 2023 7:22 am
by Radu
Hi Shikhar,
Oxygen should be able to properly load XML files even without the xml encoding declaration present.
Could you tell me more details about what error you receive in Oxygen when attempting to load such files?
Regards,
Radu

Re: document is not properly loading without xml declaration

Posted: Sun Jun 04, 2023 7:25 pm
by shikhar_472
Hi Radu,

Stylesheet is not loading properly and toolbar is also not opening

and in logs i am getting

file:/C:/DevTools/oxygen-xml-web-author/tomcat/webapps/oxygen-xml-web-author/WEB-INF/lib/oxygen-patched-xerces.jar
2023-06-02 13:14:13,017 DEBUG [ Thread-7 ] ro.sync.net.protocol.http.WebdavHttpURLConnection - Disconnecting
2023-06-02 13:14:13,017 DEBUG [ Thread-7 ] com.oxygenxml.examples.webdav.WebdavUrlInfo - java.io.IOException: Error parsing server response
java.io.IOException: Error parsing server response
at com.oxygenxml.examples.webdav.WebdavUrlInfo.getResourceType(WebdavUrlInfo.java:205)
at com.oxygenxml.examples.webdav.WebdavUrlInfo.access$100(WebdavUrlInfo.java:39)
at com.oxygenxml.examples.webdav.WebdavUrlInfo$1.run(WebdavUrlInfo.java:139)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:306)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
at com.oxygenxml.examples.webdav.WebdavUrlInfo.getResourceType(WebdavUrlInfo.java:203)
... 3 common frames omitted

Re: document is not properly loading without xml declaration

Posted: Mon Jun 05, 2023 4:10 pm
by shikhar_472
Hi Team,

Is there any update on this?

Re: document is not properly loading without xml declaration

Posted: Tue Jun 06, 2023 11:07 am
by cristi_talau
Hello,
This error message means that the response sent by your WebDAV server to a PROPFIND request is not well-formed XML. Here is the corresponding code: https://github.com/oxygenxml/web-author ... .java#L203

Best,
Cristian

Re: document is not properly loading without xml declaration

Posted: Tue Jun 06, 2023 1:20 pm
by shikhar_472
cssload.PNG
Hi Team,

Please check this image i am not able to load css properties file even in console there is no error.

Re: document is not properly loading without xml declaration

Posted: Tue Jun 06, 2023 4:33 pm
by mihaela
Hello,

So, to better understand your case, have you solved the error regarding the not well-formed response sent by your WebDAV server to a PROPFIND request?
The "cannot load the CSS" error appears only when the document does not include the XML declaration? Or it happens in both cases?
If you open the "Report Problem" dialog ("More..." menu/"Report Problem..." action) what is the name of the current document type listed in the "General info" tab? It is the document type that you expect?

Best Regards,
Mihaela

Re: document is not properly loading without xml declaration

Posted: Wed Jun 07, 2023 7:33 am
by shikhar_472
Hi Mehula,

Same error i am facing when i am trying to open the docuement in Oxygen Editor desktop based application
Without doing any call to webdav server could you please check that i am attaching the screenshot.
webeditorPNG.PNG

Re: document is not properly loading without xml declaration

Posted: Wed Jun 07, 2023 7:41 am
by mihaela
Hello,

This error means that your document is not associated with a document type. You have to check again the association rules from your custom framework.

Best Regards,
Mihaela