Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does the DOM require Well-Formed XML?

DOM formed require well-formed XML
0
10 Posted

Does the DOM require Well-Formed XML?

0

The DOM assumes that an XML document which is read in is well-formed, since otherwise the XML processor which builds the DOM structure model has to stop with a fatal error, as per the XML specification. However, it is possible to carry out some editing operations using the DOM which would result in a non-WF XML document if the document were to be naively serialized. Examples are allowing “–” in comments, or not fixing up namespace URI / prefix bindings, or allowing the insertion of a character which isn’t legal XML. If the document is serialized, the serializer is expected to fix the problem, e.g. by modifying the comment appropriately, or choosing an appropriate character encoding to make the character legal XML. This issue is expected to be resolved in Level 3.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.