| Previous | Next |
| WEB_E_UNSUPPORTED_FORMAT | WEB_E_MISSING_REQUIRED_ELEMENT |
WEB_E_INVALID_XML
WEB_E_INVALID_XML (0x83750002) identifies XML that is not well-formed for the consuming operation. The XML reader cannot construct a valid document or fragment. Typical boundaries include mismatched tags, invalid character references, illegal control characters, broken namespace syntax, and truncated markup. Record network reachability, HTTP status, and parser acceptance as separate layers.
Preserve parser location
- Keep byte offset, line and column before transcoding the payload again.
- Record the actual encoding declaration and transport charset.
- Capture the unmodified body, with secrets removed only through a reproducible redaction step.
Separate well-formedness from schema
| Layer | Question |
|---|---|
| XML well-formedness | Tags, attributes, quoting, character data, namespace syntax, and document structure. |
| Application schema | Allowed element names, order, values, and occurrence counts after XML parsing succeeds. |
| Transport framing | Whether the body was truncated, decompressed incorrectly, or decoded with the wrong character set. |
High-signal tests
- Parse the exact bytes with a second conforming XML parser
- Compare the first failure offset with the producer serialization boundary
- Use a minimal valid document in the same endpoint and content type
Completion criterion
Repair is proven when the original producer emits well-formed XML, the intended consumer accepts it, and an intentionally malformed closing tag still fails at the parser layer.
Security-sensitive parser settings
Do not make malformed input parse by broadly enabling DTD processing or external entity resolution. Those settings change the parser security boundary and do not repair mismatched tags, invalid characters, or truncation. Reproduce with the same namespace and entity policy used by the production reader.
Incident record
| Record | Purpose |
|---|---|
| First failing operation | API name, object state, and exact return point |
| Original representation | Unmodified bytes or a stable hash captured before repair or normalization |
| Contract identity | Schema, protocol, database, or persistence version with feature flags |
| Negative control | One intentionally invalid case that must remain rejected |
Repeatability versus recovery
A retry that drops this result may reflect changed process state, cache contents, timing, or input; repeat the same test in a fresh process and after the correction to distinguish repair from a transient path change.
Representation pipeline
| Stage | Evidence to retain |
|---|---|
| Producer model | Serializer, contract revision, omission, ordering, escaping, and numeric options |
| Transport bytes | Content type, charset, content encoding, declared length, and parser-visible bytes |
| Parser state | Offset, line or token path, expected construct, and actual construct |
| Projection layer | Schema, object mapper, or lookup converting XML or JSON into fields |
Normalization risks
Pretty-printing, reserialization, charset conversion, or browser copying can erase the condition producing this result; hash the original body, apply deterministic redaction, and retain both received and decompressed forms when content encoding is involved.
Focused regression corpus
- A minimal document containing no unrelated members
- A valid document at the nearest relevant boundary
- A contract-version variant showing strict or forward-compatible behavior
- A transport variant proving framing and character decoding are not hidden causes
Fix ownership
| Layer | When it owns the correction |
|---|---|
| Transport | Change framing, decompression, or character decoding only when captured bytes prove this layer altered the representation |
| Parser | Change syntax handling only when the raw token or markup violates the selected format |
| Projection | Change requiredness, path, ordering, or value conversion only after parsing succeeds |
| Producer | Correct serialization when the emitted representation contradicts the published contract |
Technical references
- Microsoft Open Specifications: HRESULT values
- Windows Web Services overview
- W3C XML 1.0 specification
- RFC 8259: The JavaScript Object Notation data interchange format
Looking for a different code? Search another status or error code.