Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Disabling word wrap for JTextPane

843804Apr 29 2005 — edited Sep 19 2009
I'm working on an extension of JTextPane, and I need to disable word wrap for it, is there anyway to do it? Please don't say just use JTextArea, it's not an option available to me. Any reply would be VERY appreciated.

Comments

cormaco
Answer

Here is a corrected version of your query,
I removed the leading slash in the starttime path and added the namespace declaration:

SELECT x.*
FROM owxml t,
   XMLTABLE (
        xmlnamespaces(default 'http://winscp.net/schema/session/1.0'),
        '/session'
        PASSING t.content
        COLUMNS
            starttime VARCHAR2(255) PATH 'group[@name="pwd"]/@start'
        ) x

STARTTIME                     
------------------------------
2020-12-01T18:22:06.383Z



Marked as Answer by CarstenDD · Dec 3 2020
CarstenDD

Hello cormaco,
thanks a lot for the quick response and the solution. Can you tell me, why the xmlnamespaces() is solving the problem?
Regards
Carsten

cormaco

You always have to declare all the namespaces that are referenced in the path expressions in your xmltable statement.
Xquery only matches tags if the name and the namespace are the same.
In you code there was no namespace declaration, so starttime had the empty default namespace xmlns="" while in your xml it was xmlns="http://winscp.net/schema/session/1.0" so the tags did not match.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 17 2009
Added on Apr 29 2005
27 comments
3,640 views