Toad World® Forums

XML Viewer


#1

Hi everyone.

When you select something from a table with some XMLTYPE columns and then click on the value (ORAXML) the LOB VIEWER (xmltype) pops up and shows you XML.

Here is my question:
on some computers XML is presented in viewer very nicely, wrapped and in colors, while on other computer the same XML (same record) is shown in colors, but not wraped (in one line).

All the computers have WIN XP, sqlnav 5.5.
I thought there are some settings in “Preferences”, but cannot find it.

Can anyone tell me how to get “nice looking” XML on all computers?

Thank you,
Paul.


#2

Hi Paul,

Welcome on board!!!

As for your issue - I cannot reproduce it whether I am using Oracle client 9i or 10g.
We know that XML in Viewer from SQL Editor is displayed as wrapped and in colors (in our test), while the same display from Table Editor is plain text although in wrapped format (again in our test), but I couldn’t display XML on one line as in your case. Would you mind to post to this group screenshots from with good XML format and the bad one. Which client you ar eusing?

SQL Navigator doesn’t have preferences for XML formatting. Another thing is how do you insert XML into database and whether you use third party XML editor, which has formatting features?

Rgds,
Andrew


#3

Hi Paul,

While investigating your issue, I noted some functionality in SQL Nav that is terribly confusing.
I draw your attention to the two attachments…
The only difference you will note between these two images, is that the XML is formatted in one of them, and not formatted in the other one.
-The first image is the clob viewer in edit mode.
-The second image is the clob viewer in view mode.
The problem is, that in the second image (view mode) there are several buttons in the dialogue that should be grayed out (i.e. inactive) or removed as the functionality is not available.
You could be forgiven for thinking that you were in edit mode!! as it looks like you are

I have logged a CR to have this functionality tidied up… and make it less confusing.
Thank you for bringing this to our attention!!

Jaime
clob_editor2.jpeg


#4

Hi Paul,

While investigating your issue, I noted some functionality in SQL Nav that is terribly confusing.
I draw your attention to the two attachments…
The only difference you will note between these two images, is that the XML is formatted in one of them, and not formatted in the other one.
-The first image is the clob viewer in edit mode.
-The second image is the clob viewer in view mode.
The problem is, that in the second image (view mode) there are several buttons in the dialogue that should be grayed out (i.e. inactive) or removed as the functionality is not available.
You could be forgiven for thinking that you were in edit mode!! as it looks like you are

I have logged a CR to have this functionality tidied up… and make it less confusing.
Thank you for bringing this to our attention!!

Jaime
clob_editor1.jpeg


#5

Thanks for responses.
Attached is my snapshot from computer, which shows it as one line.

I did not realize, that I brought some confusion:

When we issue insert statement, we do not use XML features. We actually insert varchar2 with one line xml data into a XMLTYPE column. If I make formatting of this VARCHAR2 variable before insert, Viewer will show the data formatted as well. So in order to reproduce my issue correctly - you need to insert “one-line” varchar2 with XML into a table.

The answer I am looking for is why the same record in a table (inserted as one line) is shown by Viewer as one line on some computers, and nicely wrapped on others?

In our company computers’ configurations are the same as to company standards, SQL Navigator is configured the same as well. Still the same record from DB is shown differently in XML Viewer.

My thoughts (assumptions) on this are as follow:
SQL Navigator on some computers was gradually upgraded from 4.X versions to 5.X. and on some of computers have “fresh” 5.x. Basically I suspect than XML wrapping in version 4.X was happening at a time when XML Viewer is evoked, but in 5.x does not happening at all and it shows XML the way it was physically inserted. The reason for this suspicion is the fact, that “upgraded” computers show XML nicely wrapped, but computers with new 5.x installations keep showing it in one line.
If my suspicions are correct - that would not be a beneficial enhancement.

Thank you.
xml.jpeg


#6

If your assumption is correct, I agree that it is not a good enhancement…
We will need to further investigate your theory (it’s a good theory!).

We’ll keep you updated if we confirm or discount anything.

  • Jaime -