Skip to content

Parser drops prefix #78

@sshikaree

Description

@sshikaree

If previous sibling contains same xmlns as current prefix does, the prefix will be dropped.

<omx xmlns:ct="automation.control">
	<parameter xmlns="automation.control"/>
	<ct:socket name="Info" />
</omx>
nodes, _ := xmlquery.QueryAll(root, "//*")
for _, node := range nodes {
		fmt.Println("Data:", node.Data, "Prefix:", node.Prefix, "Namespace:", node.NamespaceURI)
}

gives
Data: socket Prefix: Namespace: automation.control
If I change to <parameter xmlns="automation.control_2"> everything is fine:
Data: socket Prefix: ct Namespace: automation.control

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions