XML tree — version history
An XML document displayed like a foldable code editor — line numbers, coloured tags, attributes and text, search — whose every line reports its XPath. Introduced in 3.0.
4.0 — October 2026 #
New #
- Every attribute is a target: a click gives its path (
/order/@id),of_select_pathselects it,of_selected_valuereturns its value; Right arrow on a tag walks through its attributes one by one (Left arrow comes back). of_selected_xml,of_copyand Ctrl+C: the XML of the selection.of_expand_path,of_collapse_pathandof_is_expandedopen, fold and query one element by any XPath; the newue_node_toggled(as_path, ab_expanded)event reports a fold or unfold by the user or by these two methods.of_select_pathaccepts any XPath (//line[@sku='A'],/r/a[1]): the first matching node is selected, andof_selected_paththen returns the tree's own path.- An invalid XML shows its source around the faulty line, numbered, with the line marked and the column underlined (an error past the end of a line marks the line end).
- Large documents only draw the lines on screen: 8,000 sibling elements appear in a fraction of a second, and arrow keys answer in milliseconds.
- F3 and Shift+F3 go to the next / previous search match; screen readers get the tree structure and the selected line.
- Search options, like the code editor:
ib_find_match_casefinds only the text with the same case,ib_find_whole_wordfinds it only as a whole word (idis no longer found insideuser_id); the search box (Ctrl+F) has the matching Aa and ab toggles, and a change of option runs the search again. Both are off by default: the search stays as it was.
Fixed #
- CDATA content is shown (the element used to look empty); comments, processing instructions and the XML declaration are displayed; mixed content keeps its text in document order and significant spaces; each line stays valid XML (
", ,&,<,]]>). - A
<?xml-stylesheet?>without XML declaration is shown once, no longer twice. is_xmlreads back exactly as it was set, invalid text included;is_xml = ""empties the tree without an error;of_clearempties the tree and keepsib_wrapandib_search_enabled(of_resetrestores everything).- A document with a real
<parsererror>element is displayed like any other. - Search counts occurrences, each one highlighted, with a single current one; it only opens the elements that hide the current match, and
of_clear_searchrestores the folds from before the search; a new document refreshes an open search bar. - A search no longer folds or moves the selected line; folding the element that holds the selection moves the selection onto it and says so in
ue_selection_changed;ue_selection_changedis no longer raised when nothing changes. - Keyboard: no more blocking on an element with both text and children, closing tags are skipped, Right arrow on a leaf does nothing, and multi-line text, CDATA or comments are followed by search and Page Up / Page Down.
- Focus given to the component (Tab,
of_focus_webview) goes to the tree, so arrows and Enter work; Enter on a leaf raisesue_node_clickedinstead of pressing the window's default button; Escape first closes the search bar. ue_erroris written in the display language, including when the language changes just before the document is set.- Reading back a long text value takes time proportional to its size and returns it whole (it slowed down with the size and was cut beyond a million characters).
- Enter or Esc pressed in the component, when it does not use them, goes back to the window: the PowerBuilder
DefaultorCancelCommandButtonfires (the key was lost). - With no language chosen by the application, the component announces English to screen readers (it announced French).
is_theme_style,is_theme_modeandil_theme_accentread back the style and mode shown and the component's own accent (-1when it has none); an unknown or badly written value is ignored instead of leaving the component without a theme, and an axis left empty follows the application's theme.- The application accent (
PBT_SetDefaultThemeAccent) survives a change of theme, is followed as long as the component has no accent of its own, and repaints everything derived from it (hover, pressed, selections); Windows high contrast is supported.
Behavior changes #
See the 3.0 → 4.0 migration guide, sections 11.3, 11.6, 11.29 and 11.30.
- The path of an element under a default namespace (
xmlns="urn:…") is/*[local-name()='Envelope']/*[local-name()='Body'], an XPath thatn_pbt_xml.of_get_valuereads as is (it used to be/Envelope/Body, which matched nothing). A prefix redeclared with another URI, or a same-name sibling in another namespace, also gets a path that designates exactly that node. - A text, comment or processing-instruction line has its own path (
/r/text()[2],/r/comment()[1]), no longer its element's. of_select_pathwith an unknown path returns-5and the selection does not move; it opens the elements that hide the target, and raisesue_selection_changedlike the keyboard does.ue_errorreads "Invalid XML: line 1, column 11 (…)" in the display language: do not parse its text.- A document of more than 1,500,000 lines is refused with a message and
ue_error. - The tree is always laid out left to right (an XML document is left-to-right text); only its search bar follows a right-to-left application.
3.0 — September 2026 #
New #
- First release: an XML value set in
is_xmlshown as a foldable, coloured code view — line numbers, a fold marker on each element, optional line wrapping (ib_wrap). - Search with highlighting and navigation (
of_search,of_search_next,of_search_prev,of_match_count,ue_search_result), a built-in search bar (ib_search_enabled). of_expand_all,of_collapse_all,of_expand_to_level;of_select_path,of_selected_path,of_selected_value.ue_node_clickedreports the path of the clicked node,ue_selection_changeda keyboard move,ue_erroran invalid XML.ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).