Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Because the content of an entity declaration can contain almost anything, there is a possibility that the content could contain an element like <!ENTITY aname "<elem>test</elem>">
.
When the XML is parsed, &aname;
is not expanded with its replacement content at parse time. The expansion of the XML is not done because resolution of the namespace for the element cannot occur until the node is placed in the document. Until that time, there is no knowledge of what namespace is in scope. When the node is put into the document, then the namespace resolution occurs, and the resulting entity content is parsed into its appropriate nodes.
Note
Once the expansion occurs on a newly created entity reference node, it never reoccurs. Therefore, the namespaces used in the replacement text for the element are bound at the time that the parent node is set. However, the namespace can be changed for existing entity reference nodes when you remove and insert them somewhere else, or on entity reference nodes that are cloned with the CloneNode method.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now