mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 00:50:52 +00:00
* 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
3.5 KiB
3.5 KiB
libSceXml
change [The String, SimpleData, SerializeParameter, NodeId and Node value operations and the handle constructors]
- The
String,SimpleData,SerializeParameter,NodeIdandNodevalue operations and the handle constructors (libSceXml) - followlibSceXml.sprxof firmware 13.60, read from disassembly, not measured on a console.NodeId::operator void*returns null for everyNodeId, and theNodeIdconstructor and copies leave its padding bytes untouched. The handle constructors only clear the implementation pointer. Exports that read the objectsinitializebuilds still throw, because nothing creates those objects yet: theSax::Parsersetters, andNode::getOwnerDocument, whose return type is not established.Node::getAttributes()andNode::getChildNodes()without a list are a bare return in the module, and the deletingMemAllocatordestructor isud2, so they still throw too.
change [Node]
- Node (libSceXml) - builds a node handle from a
NodeIdand 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 fromisAvailable, which tests both, and from the 64-byte object the copy constructor and the assignment already handle, not read from the module.getNodeTypegives theDocumentread's node type and0xfffffffffor a nullNodeId, the valueDocument::getNodeTypegives an empty document; that this export returns 32 bits is inferred from a node type being a small integer.hasChildNodesandhasAttributesare 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,removeChildandinsertBeforestill 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 theNodeIds a title already holds. A writable document needs a stable node handle and is a separate change.Node::getAttributes()andNode::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 aNodeListare 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,getNextSiblingandgetParentNodereturn aNodeIdthrough a hidden result pointer: the nodeDocument::getFirstChild,getLastChild,getSiblingandgetParentgive for the node's document and position, whose lookups they call.getNodeNameandgetNodeValuereturn aStringthe same way and switch on theDocument::getNodeTypevalue: type 0 givesxmlandversion="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.getChildNodesandgetAttributesinto aNodeListfill it as theDocumentreads do for the node's id; a null list gives0x80850003and a node without a document0x80850002. Every read gives a null result when the node has no document and throws after its builder parsed again or terminated.