I'm trying to find an element which can display xml data properly. Any suggestions?
Announcement
Collapse
No announcement yet.
X
-
For a simple non-interactive read-only display, consider just quoting it and displaying it in an HTMLFlow. This is easy to copy and paste, if that's needed.
You can also use an HTMLFlow in contentsType:"page" mode to get the browser's default rendering of the XML (generally a collapsible tree).
Finally there's the DOMGrid, also an interactive collapsible tree. Bear in mind, although it's based on TreeGrid, it hasn't been designed with a huge degree of customizability. But if you like the default behavior, it's a good approach.
-
I tried using the HTMLFlow approach but it just shows up as regular string. Am I missing something?
Code:isc.HTMLFlow.create({ width:230,height: 200, contentsType: "page", contents:"<?xml version="1.0" encoding="ISO-8859-1"?><ntOrder><orderInstance><cwDocId>13156001</cwDocId><orderInstance></ntOrder>" })
Comment
-
That's exactly what I have...
The original data was
Code:<ntOrder><orderInstance><cwDocId>13156001</cwDocId></orderInstance></ntOrder>
Code:"<?xml version="1.0" encoding="ISO-8859-1"?><ntOrder><orderInstance><cwDocId>13156001</cwDocId><orderInstance></ntOrder>"
Comment
Comment