Files
AnyPS5/docs/dev/debt/changes/feat-libscexml-node-navigation.md
RiverWhy 6ebbf82fe3 feat(libSceXml): implement the Node navigation, name and list reads (#23098)
* feat(libSceXml): implement the Node navigation getters
* feat(libSceXml): implement Node::getNodeName and getNodeValue
* feat(libSceXml): implement Node::getChildNodes and getAttributes into a list
* docs(libSceXml): record the Node list reads
* docs(libSceXml): fit the Node reads debt entry
* docs(libSceXml): correct the Node entry for the list reads
2026-12-04 19:03:32 +13:00

3.5 KiB

libSceXml

change [The String, SimpleData, SerializeParameter, NodeId and Node value operations and the handle constructors]

  • The String, SimpleData, SerializeParameter, NodeId and Node value operations and the handle constructors (libSceXml) - follow libSceXml.sprx of firmware 13.60, read from disassembly, not measured on a console. NodeId::operator void* returns null for every NodeId, and the NodeId constructor and copies leave its padding bytes untouched. The handle constructors only clear the implementation pointer. Exports that read the objects initialize builds still throw, because nothing creates those objects yet: the Sax::Parser setters, and Node::getOwnerDocument, whose return type is not established. Node::getAttributes() and Node::getChildNodes() without a list are a bare return in the module, and the deleting MemAllocator destructor is ud2, so they still throw too.

change [Node]

  • Node (libSceXml) - builds a node handle from a NodeId and answers the node type and the child and attribute flags through it; the behaviour is not measured on a console. Node(NodeId) copies the id, keeps its two pointers as the document and the position, and zeroes the three state words; that the object holds exactly those two handles is inferred from isAvailable, which tests both, and from the 64-byte object the copy constructor and the assignment already handle, not read from the module. getNodeType gives the Document read's node type and 0xffffffff for a null NodeId, the value Document::getNodeType gives an empty document; that this export returns 32 bits is inferred from a node type being a small integer. hasChildNodes and hasAttributes are false for that node. The destructor frees nothing, the handle owning no block. Reading a node after its builder parsed again or terminated throws, as the document reads do.
    • appendChild, removeChild and insertBefore still throw: a node's position is a byte offset in the document stream and its siblings sit next to it, so adding or removing a node moves every node after it and invalidates the NodeIds a title already holds. A writable document needs a stable node handle and is a separate change.
    • Node::getAttributes() and Node::getChildNodes() without a list still throw although the module is a bare return: the export returns an object by value and the module leaves it untouched. The forms that fill a NodeList are not a bare return; see Node reads.

add Functional

  • Node reads (libSceXml) - read from a decrypted PS4 libSceXml.sprx, not compared with a PS5 module. getFirstChild, getLastChild, getNextSibling and getParentNode return a NodeId through a hidden result pointer: the node Document::getFirstChild, getLastChild, getSibling and getParent give for the node's document and position, whose lookups they call. getNodeName and getNodeValue return a String the same way and switch on the Document::getNodeType value: type 0 gives xml and version="1.0", type 1 the attribute name and value, type 4 the element name and its text, and other types no name and their text. getChildNodes and getAttributes into a NodeList fill it as the Document reads do for the node's id; a null list gives 0x80850003 and a node without a document 0x80850002. Every read gives a null result when the node has no document and throws after its builder parsed again or terminated.