[PATCH v3 3/5] msxml3: Implement ::get_attributes() for "xml" processing instruction node.

Nikolay Sivov nsivov at codeweavers.com
Fri May 7 01:06:18 CDT 2021


On 4/27/21 12:27 PM, Dmitry Timoshkov wrote:
> +    /* xmlSetProp/xmlSetNsProp accept only nodes of type XML_ELEMENT_NODE,
> +     * so we have to create and assign attributes to a node by hand.
> +     */
> +
> +    if (version)
> +    {
> +        attr = xmlSetNsProp(NULL, NULL, (const xmlChar *)"version", version);
> +        if (attr)
> +        {
> +            attr->doc = node->doc;
> +            set_prop(node, attr);
> +        }
> +        else hr = E_OUTOFMEMORY;
> +    }
This is abusing libxml2 tree structure, because 'properties' is expected
only for XML_ELEMENT_NODE nodes. I don't think we should break that
assumption.



More information about the wine-devel mailing list