To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=69876
Issue #|69876
Summary|com.sun.star.xml.dom.DocumentBuilder is not working pr
|operly for xml documentsa that has no encoding specifi
|ed
Component|api
Version|OOo 2.0.3
Platform|All
URL|http://api.openoffice.org/docs/common/ref/com/sun/star
|/xml/dom/DocumentBuilder.html
OS/Version|All
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|jsc
Reported by|faltrion
------- Additional comments from [EMAIL PROTECTED] Tue Sep 26 05:08:32 -0700
2006 -------
I'm trying to use the com.sun.star.xml.dom.DocumentBuilder service
but for me it is not working.
The problem is that the xml document do not have an <?xml ...?> processing
instruction in it and it have characters that is encoded in ISO-8859-1
(norwegian characters åæø)
this makes the parse function in the DocumentBuilder service return null
no errors/exceptions or anything just plain null.
this is how I wrote my function
oSFA = createUNOService ("com.sun.star.ucb.SimpleFileAccess")
oInpStream = oSFA.openFileRead(sUrl)
oDB = createUnoService("com.sun.star.xml.dom.DocumentBuilder")
domDoc = oDB.parse(oInpStream)
oInpStream.closeInput
It was suggested that I could perheps try to use the TextInputStream to set the
encoding to ISO-8859-1 and use that instead, but the person that suggested that
now say that it will not work since DocumentBuilder apparently ignores that
information.
oSFA = createUNOService ("com.sun.star.ucb.SimpleFileAccess")
oInpStream = oSFA.openFileRead(sUrl)
oTextInpStream = createUnoService("com.sun.star.io.TextInputStream")
oTextInpStream.setInputStream(oInpStream)
oTextInpStream.setEncoding("iso-8859-1")
oDB = createUnoService("com.sun.star.xml.dom.DocumentBuilder")
domDoc = oDB.parse(oTextInpStream)
oInpStream.closeInput
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]