PBToolboxAI AcheterBuyKaufenAcquistaComprarComprar

← Historique de tous les composants← History of every component← Versionsverlauf aller Komponenten← Cronologia di tutti i componenti← Historial de todos los componentes← Histórico de todos os componentes

L'historique des versions est publié en anglais.Version history is published in English.Der Versionsverlauf wird auf Englisch veröffentlicht.La cronologia delle versioni è pubblicata in inglese.El historial de versiones se publica en inglés.O histórico de versões é publicado em inglês.

XML — version history

n_pbt_xml · Introduced in 3.0

A non-visual object that builds an XML document element by element and reads or modifies one with real XPath 1.0 — PowerBuilder 10 has no XML parser of its own. Introduced in 3.0.

4.0 — October 2026 #

New #

  • of_get_value accepts XPath value expressions — count(//line), sum(//@qty), boolean(…) — and returns the result as text (3, true).
  • A prefix declared lower than the root (a SOAP response) resolves without of_register_namespace, and the xml prefix is always bound (@xml:lang is read).
  • of_add_child and of_set_attr accept a prefixed name (xsi:type, p:item) in the namespace of that prefix; of_add_xml gives the fragment the namespaces in force at its target, as of_add_child does.

Fixed #

  • After building a document, reads and changes apply to that document (they used to act on the last loaded one, or on nothing); the next of_start_element starts a new one.
  • A failed of_load (empty, malformed) leaves nothing readable behind; a half-built document no longer stays in of_xml.
  • of_xml, of_pretty and of_get_values return a large document in full instead of cutting it after a few MB.
  • of_pretty keeps CDATA sections, comments, processing instructions and the XML declaration, keeps an element that holds text on one line, and keeps the prefix of an element added under a prefixed parent.
  • The builder writes documents that read back identically: line breaks and tabs in attributes, carriage returns in text; control characters are removed; an invalid element name is refused (is_last_error) and the element left out; the same attribute set twice keeps one attribute with the second value.
  • A document that contains a <parsererror> element loads normally; the error message of a malformed XML is the error line alone.
  • of_remove counts nested nodes once, removes attributes, and never removes the root (of_clear empties a document); of_set_value("/") returns -4; of_add_child under an attribute says "the node cannot have children".
  • is_last_error gives the real reason after an invalid XPath, an unanswered page or a refusal; a page that does not answer returns an empty value, not the text null.
  • of_close followed by a read keeps and reloads the loaded document; ipo_owner set after the first read is taken into account at the next one.
  • of_get_values on thousands of nodes takes a time proportional to their number (5,000 values used to take several seconds).
  • The "Quick start" example of the documentation creates the object (create n_pbt_xml) and frees it (destroy); as written it stopped on a null object reference.

Behavior changes #

See the 3.0 → 4.0 migration guide, sections 11.3 and 11.31.

  • of_transform is removed: XSLT is being withdrawn from the browser engine the component relies on. Transform on the server side, or in PowerScript.
  • A read (of_exists, of_count, of_get_value, of_is_valid…) or a change while a built element is still open is refused — -4, empty or false, and is_last_error = "the document is still being built : close its elements first" — instead of silently losing the rest of the document; of_xml and of_pretty remain allowed.
  • of_remove follows the library's codes: -5 for an empty XPath, -4 with no loaded document, -2 when the page does not answer; a count (>= 0) only when the removal was attempted.
  • of_set_attr / of_add_child with an undeclared prefix return -4 and "undeclared prefix : …" instead of writing a document that no longer reloads.
  • of_register_namespace refuses an empty URI (-5); of_register_namespace and of_clear_namespaces return -2 when the page does not answer.
  • of_open returns -2 when the page cannot be created; is_last_error says why.

3.0 — September 2026 #

New #

  • First release: build a document with of_start_element, of_element_attr, of_element_text, of_end_element and of_leaf, escaping done for you, then of_xml.
  • Read a document with real XPath 1.0 through the WebView2 engine, synchronously: of_load, of_is_valid, of_exists, of_get_value, of_get_attr, of_count, of_name, and several nodes at once with of_get_values, of_get_attrs, of_get_attr_names.
  • Modify a loaded document in place: of_set_value, of_set_attr, of_remove_attr, of_add_child, of_add_xml, of_remove; of_pretty for an indented copy.
  • Namespaces (of_register_namespace, of_clear_namespaces) and XSLT transformation (of_transform).