1. Sheldon Shulman
  2. PowerBuilder
  3. Wednesday, 20 March 2019 20:19 PM UTC

I extract xml from an Oracle Clob in a view using the following type syntax

select col1, col2, dbms_lob.substr( t.col_clob, 4000, 1 )) col_3 from table1 t

I display the columns from the view in a DataWindow.

I want to display the col_3 results to the user. (Yes, they want to see the xml).

The xml being thrown into a text field is not formatted nicely.

 

Is there a way to format this xml data nicely?

 

When they click inside the data area - the format gets all messy (they also require to be able to copy and paste from this column).

 

I rarely work with xml being displayed to a user - was wondering if anyone has suggestions for me.

 

Any Suggestions Are Greatly Appreciated.

 

Sheldon

 

 

Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 11:50 AM UTC
  2. PowerBuilder
  3. # 1

Create a dw with the xml schema mapped out into the Export/Import Template.  Then when the user double clicks on the row/column, open a new response window with your new dw.  Do a GetItemString on that column in the original dw, then pass it to the new window using openwithparm.  In the new window, do a dw.ImportString for the xml.  That should give them a much better view of the data, and one they are already familiar with.

 

KR

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2019 21:04 PM UTC
  2. PowerBuilder
  3. # 2

Hi Sheldon;

   The DW or any PB Control (ie like the RTE) does not have XML formatting smarts. My suggestions would be:

1) Use an XML to RTF utility to reformat the XML. Then import that RTF file into an RTE control

2) Use a 3rd party OCX control that displays the XML properly (like XMLNotePad or XMLViewer does for example)

HTH

Regards ... Chris

Comment
  1. Sheldon Shulman
  2. Friday, 22 March 2019 16:47 PM UTC
Thanks guys for your suggestions - I will try some of them out and see how it goes.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.