1 type derived from XmlException
System.Security.Cryptography.Xml (1)
475 instantiations of XmlException
Microsoft.Build (3)
PresentationBuildTasks (1)
PresentationFramework (20)
System\Windows\Annotations\Annotation.cs (8)
326throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Annotation));
341throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Annotation));
551throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, elementName));
661throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Annotation));
669throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, AnnotationXmlConstants.Elements.Annotation));
673throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.CreationTime, AnnotationXmlConstants.Elements.Annotation));
677throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.LastModificationTime, AnnotationXmlConstants.Elements.Annotation));
681throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.TypeName, AnnotationXmlConstants.Elements.Annotation));
System.IO.Packaging (36)
System\IO\Packaging\InternalRelationshipCollection.cs (12)
161throw new XmlException(SR.Format(SR.NotAValidXmlIdString, id), exception);
255throw new XmlException(SR.RelationshipsTagHasExtraAttributes, null, reader.LineNumber, reader.LinePosition);
294throw new XmlException(SR.RelationshipTagDoesntMatchSchema, null, reader.LineNumber, reader.LinePosition);
299throw new XmlException(SR.UnknownTagEncountered, null, reader.LineNumber, reader.LinePosition);
302else throw new XmlException(SR.ExpectedRelationshipsElementTag, null, reader.LineNumber, reader.LinePosition);
344throw new XmlException(SR.Format(SR.RequiredRelationshipAttributeMissing, TargetAttributeName), null, reader.LineNumber, reader.LinePosition);
351throw new XmlException(SR.Format(SR.RequiredRelationshipAttributeMissing, TypeAttributeName), null, reader.LineNumber, reader.LinePosition);
357throw new XmlException(SR.Format(SR.RequiredRelationshipAttributeMissing, IdAttributeName), null, reader.LineNumber, reader.LinePosition);
376throw new XmlException(SR.Format(SR.ElementIsNotEmptyElement, RelationshipTagName), null, reader.LineNumber, reader.LinePosition);
580throw new XmlException(SR.Format(SR.InvalidXmlBaseAttributePresent, XmlBaseAttributeName), null, reader.LineNumber, reader.LinePosition);
586throw new XmlException(SR.Format(SR.InvalidValueForTheAttribute, attributeName), ex, reader.LineNumber, reader.LinePosition);
616throw new XmlException(SR.Format(SR.NotAUniqueRelationshipId, id));
System\IO\Packaging\PartBasedPackageProperties.cs (14)
389throw new XmlException(SR.Format(SR.DuplicateCorePropertyName, reader!.Name),
498throw new XmlException(SR.CorePropertiesElementExpected,
505throw new XmlException(SR.Format(SR.PropertyWrongNumbOfAttribsDefinedOn, reader.Name),
524throw new XmlException(SR.PropertyStartTagExpected,
531throw new XmlException(SR.NoStructuredContentInsideProperties,
544throw new XmlException(
553throw new XmlException(SR.UnknownNamespaceInCorePropertiesPart,
562throw new XmlException(SR.Format(SR.PropertyWrongNumbOfAttribsDefinedOn, reader.Name),
577throw new XmlException(SR.Format(SR.PropertyWrongNumbOfAttribsDefinedOn, reader.Name),
611throw new XmlException(SR.Format(SR.UnknownDCDateTimeXsiType, reader.Name),
620throw new XmlException(SR.Format(SR.UnknownDCDateTimeXsiType, reader.Name),
630throw new XmlException(SR.Format(SR.UnknownDCDateTimeXsiType, reader.Name),
648throw new XmlException(SR.NoStructuredContentInsideProperties,
670throw new XmlException(SR.XsdDateTimeExpected,
System\IO\Packaging\ZipPackage.cs (8)
989throw new XmlException(SR.TypesTagHasExtraAttributes, null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1026throw new XmlException(SR.TypesXmlDoesNotMatchSchema, null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1032throw new XmlException(SR.TypesElementExpected, null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1166throw new XmlException(SR.DefaultTagDoesNotMatchSchema, null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1193throw new XmlException(SR.OverrideTagDoesNotMatchSchema, null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1229throw new XmlException(SR.Format(SR.ElementIsNotEmptyElement, elementName), null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1281throw new XmlException(SR.Format(SR.RequiredAttributeEmpty, tagName, attributeName), null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
1290throw new XmlException(SR.Format(SR.RequiredAttributeMissing, tagName, attributeName), null, ((IXmlLineInfo)reader).LineNumber, ((IXmlLineInfo)reader).LinePosition);
System.Private.DataContractSerialization (110)
System\Runtime\Serialization\Json\XmlJsonReader.cs (11)
492new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch)));
549new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter,
590new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter,
678new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch)));
1162new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)nextByte)));
1181new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)nextByte)));
1213new XmlException(SR.Format(SR.XmlInvalidLowSurrogate, bufferAsString)));
1263new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch)));
1306XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.JsonInvalidFFFE));
1573XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, val[i])));
1602new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, val[i])));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (28)
431throw new XmlException(SR.JsonNoMatchingStartAttribute);
477throw new XmlException(SR.Format(SR.JsonUnexpectedAttributeValue, _attributeText));
544throw new XmlException(SR.JsonEndElementNoOpenNodes);
548throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteEndElement"));
581throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.typeString, JsonGlobals.objectString, JsonGlobals.serverTypeString));
588throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.itemString, string.Empty, JsonGlobals.itemString));
666throw new XmlException(SR.JsonXmlInvalidDeclaration);
752throw new XmlException(SR.JsonAttributeMustHaveElement);
756throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteStartAttribute"));
766throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.typeString));
775throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.serverTypeString));
780throw new XmlException(SR.Format(SR.JsonServerTypeSpecifiedForInvalidDataType,
790throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.itemString));
797throw new XmlException(SR.JsonEndElementNoOpenNodes);
823throw new XmlException(SR.Format(SR.JsonInvalidWriteState, "WriteStartDocument", WriteState.ToString()));
855throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteStartElement"));
859throw new XmlException(SR.JsonMultipleRootElementsNotAllowedOnWriter);
868throw new XmlException(SR.Format(SR.JsonInvalidRootElementName, localName, JsonGlobals.rootString));
877throw new XmlException(SR.JsonNodeTypeArrayOrObjectNotSpecified);
893throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName, JsonGlobals.itemString));
918throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName, JsonGlobals.itemString));
924throw new XmlException(SR.JsonInvalidStartElementCall);
1119throw new XmlException(SR.JsonCannotWriteStandaloneTextAfterQuotedText);
1191throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.typeString, JsonGlobals.objectString, JsonGlobals.serverTypeString));
1198throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.itemString, string.Empty, JsonGlobals.itemString));
1227throw new XmlException(SR.Format(SR.JsonInvalidDataTypeSpecifiedForServerType, JsonGlobals.typeString, dataTypeSpecified, JsonGlobals.serverTypeString, JsonGlobals.objectString));
1235throw new XmlException(SR.JsonInvalidMethodBetweenStartEndAttribute);
1239throw new XmlException(SR.Format(SR.JsonCannotWriteTextAfterNonTextAttribute, _dataType.ToString().ToLowerInvariant()));
System\Xml\EncodingStreamWrapper.cs (23)
105throw new XmlException(SR.XmlDeclarationRequired);
111throw new XmlException(SR.XmlInvalidBytes, ex);
129_ => throw new XmlException(SR.XmlEncodingNotSupported),
138_ => throw new XmlException(SR.XmlEncodingNotSupported),
147_ => throw new XmlException(SR.XmlEncodingNotSupported),
161throw new XmlException(SR.XmlEncodingNotSupported);
200throw new XmlException(SR.UnexpectedEndOfFile);
254throw new XmlException(SR.XmlDeclMissing);
262throw new XmlException(SR.XmlDeclMissing);
269throw new XmlException(SR.XmlBadBOM);
351throw new XmlException(SR.XmlDeclarationRequired);
356throw new XmlException(SR.XmlMalformedDecl);
365throw new XmlException(SR.XmlDeclarationRequired);
374throw new XmlException(SR.XmlMalformedDecl);
381throw new XmlException(SR.XmlMalformedDecl);
435throw new XmlException(SR.UnexpectedEndOfFile);
485throw new XmlException(SR.XmlDeclarationRequired);
493throw new XmlException(SR.XmlInvalidBytes, e);
499throw new XmlException(SR.Format(SR.XmlExpectedEncoding, GetEncodingName(expEnc), GetEncodingName(actualEnc)));
509throw new XmlException(SR.Format(SR.XmlEncodingMismatch, declEnc, docEnc));
627throw new XmlException(SR.XmlInvalidBytes, ex);
642throw new XmlException(SR.UnexpectedEndOfFile);
663throw new XmlException(SR.UnexpectedEndOfFile);
System\Xml\XmlBaseReader.cs (12)
130XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion));
133XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl));
137XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion));
146XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl));
150XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl));
163XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl));
169XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidStandalone));
178XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl));
184XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(valueSR)));
349XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xml", xmlNamespace)));
353XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xmlns", xmlnsNamespace)));
1512throw new XmlException(exception.Message, exception.InnerException);
System.Private.Xml (274)
System\Xml\BinaryXml\XmlBinaryReader.cs (44)
93throw new XmlException(SR.XmlBinary_NoRemapPrefix, new string[] { prefix, this.namespaceUri, namespaceUri });
969throw new XmlException(e.Message, e);
1130throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, null);
1134throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, null);
1220throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1224throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1228throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, null);
1315throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1319throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1323throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, null);
1410throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1414throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1418throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, null);
1505throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1509throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1513throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, null);
1600throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1604throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1608throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int32", e, null);
1695throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1699throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1703throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int64", e, null);
1735throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1739throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1743throw new XmlException(SR.Xml_ReadContentAsFormatException, "Object", e, null);
1782throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1786throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1790throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, null);
1956throw new XmlException(SR.Xml_BadNamespaceDecl, (string[]?)null);
1977throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
1985throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
2324throw new XmlException(SR.Xml_UnexpectedEOF1, (string[]?)null);
2580throw new XmlException(err, (string[]?)null);
2630throw new XmlException(SR.Xml_PrefixForEmptyNs, string.Empty);
2705throw new XmlException(SR.Xml_DupAttributeName, _attributes[i].name.ToString());
2730throw new XmlException(SR.Xml_DupAttributeName, _attributes[i].name.ToString());
2789throw new XmlException(SR.XmlBin_MissingEndCDATA);
2838throw new XmlException(SR.Xml_UnexpectedEOF1, (string[]?)null);
3605throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null);
4017throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4166throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4364throw new XmlException(SR.XmlBin_InvalidQNameID, string.Empty);
4403return new XmlException(res, (string[]?)null);
4409return new XmlException(res, new string[] { arg1, arg2 });
System\Xml\Core\XmlReader.cs (28)
167throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
186throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
205throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTimeOffset", e, this as IXmlLineInfo);
224throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
243throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
262throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
281throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
300throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
337throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
341throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
750throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
760throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
768throw new XmlException(SR.Xml_ElementNotFound, name, this as IXmlLineInfo);
778throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
786throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localname, ns }, this as IXmlLineInfo);
798throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
806throw new XmlException(SR.Xml_UnexpectedNodeInSimpleContent, new string[] { NodeType.ToString(), "ReadElementString" }, this as IXmlLineInfo);
825throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
829throw new XmlException(SR.Xml_ElementNotFound, name, this as IXmlLineInfo);
838throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
857throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
861throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localname, ns }, this as IXmlLineInfo);
870throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
887throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
1417throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
1422throw new XmlException(SR.Xml_ElementNotFoundNs, new string[] { localName, namespaceURI }, this as IXmlLineInfo);
1539throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
1549throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString());
System\Xml\Core\XmlTextReaderImpl.cs (18)
648throw new XmlException(SR.Xml_CannotResolveUrl, _laterInitParam.inputUriStr);
1518throw new XmlException(SR.Xml_InternalError, string.Empty);
1544throw new XmlException(SR.Xml_InternalError, string.Empty);
2054throw new XmlException(SR.Xml_WhitespaceHandling, string.Empty);
2090throw new XmlException(SR.Xml_EntityHandling, string.Empty);
2682Throw(new XmlException(res, string.Empty, lineNo, linePos, _ps.baseUriStr));
2688Throw(new XmlException(res, arg, _ps.LineNo, _ps.LinePos, _ps.baseUriStr));
2694Throw(new XmlException(res, arg, lineNo, linePos, _ps.baseUriStr));
2700Throw(new XmlException(res, args, _ps.LineNo, _ps.LinePos, _ps.baseUriStr));
2712Throw(new XmlException(res, args, innerException, _ps.LineNo, _ps.LinePos, _ps.baseUriStr));
2732Throw(new XmlException(e.Message, (Exception?)null, lineNo, linePos, _ps.baseUriStr));
2738Throw(new XmlException(res, string.Empty, _ps.baseUriStr));
2744Throw(new XmlException(res, arg, _ps.baseUriStr));
2750Throw(new XmlException(res, args, innerException, 0, 0, _ps.baseUriStr));
7930Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0));
9013throw new XmlException(SR.Xml_NametableMismatch);
9031throw new XmlException(SR.Xml_NametableMismatch, string.Empty);
9458throw new XmlException(SR.Xml_InvalidNodeType, _curNode.type.ToString(), this as IXmlLineInfo);
System\Xml\Core\XsdValidatingReader.cs (56)
478throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
482throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
486throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
512throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
516throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
520throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
546throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
550throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
554throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
580throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
584throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
588throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
614throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
618throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
622throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
648throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
652throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
656throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
683throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
687throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
691throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
718throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
722throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
726throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
760throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
764throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
768throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
806throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
810throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
814throw new XmlException(SR.Xml_ReadContentAsFormatException, "Boolean", e, this as IXmlLineInfo);
841throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
845throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
849throw new XmlException(SR.Xml_ReadContentAsFormatException, "DateTime", e, this as IXmlLineInfo);
876throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
880throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
884throw new XmlException(SR.Xml_ReadContentAsFormatException, "Double", e, this as IXmlLineInfo);
911throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
915throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
919throw new XmlException(SR.Xml_ReadContentAsFormatException, "Float", e, this as IXmlLineInfo);
946throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
950throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
954throw new XmlException(SR.Xml_ReadContentAsFormatException, "Decimal", e, this as IXmlLineInfo);
981throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
985throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
989throw new XmlException(SR.Xml_ReadContentAsFormatException, "Int", e, this as IXmlLineInfo);
1016throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1020throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1024throw new XmlException(SR.Xml_ReadContentAsFormatException, "Long", e, this as IXmlLineInfo);
1051throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1055throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1059throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
1094throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
1098throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
1102throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
2494throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
2503throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
System\Xml\Core\XsdValidatingReaderAsync.cs (14)
63throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
67throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
71throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
110throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
114throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
118throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
162throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
166throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
170throw new XmlException(SR.Xml_ReadContentAsFormatException, "String", e, this as IXmlLineInfo);
210throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
214throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
218throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo);
829throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
841throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo);
System\Xml\Schema\DtdParser.cs (3)
3461_readerAdapter.Throw(new XmlException(res, arg, (int)LineNo, (int)LinePos, baseUri?.ToString()));
3469_readerAdapter.Throw(new XmlException(res, args, (int)LineNo, (int)LinePos, baseUri?.ToString()));
3476_readerAdapter.Throw(new XmlException(res, arg, (int)lineNo, (int)linePos, baseUri?.ToString()));
System\Xml\ValidateNames.cs (17)
374throw new XmlException(SR.Format(SR.Xml_EmptyName, string.Empty));
381throw new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
386throw new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
394return new XmlException(SR.Xml_EmptyName, string.Empty);
401return new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
406return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
480if (throwOnError) throw new XmlException(SR.Xdom_Empty_LocalName, string.Empty);
489if (throwOnError) throw new XmlException(SR.XmlBadName, new string[] { nodeKind.ToString(), localName });
498if (throwOnError) throw new XmlException(SR.Xml_InvalidPIName, localName);
507if (throwOnError) throw new XmlException(SR.XmlNoNameAllowed, nodeKind.ToString());
527if (throwOnError) throw new XmlException(SR.Xml_PrefixForEmptyNs, string.Empty);
536if (throwOnError) throw new XmlException(SR.XmlBadName, new string[] { nodeKind.ToString(), localName });
545if (throwOnError) throw new XmlException(SR.Xml_XmlPrefix, string.Empty);
552if (throwOnError) throw new XmlException(SR.Xml_XmlnsPrefix, string.Empty);
558if (throwOnError) throw new XmlException(SR.Xml_NamespaceDeclXmlXmlns, string.Empty);
568if (throwOnError) throw new XmlException(SR.Xml_InvalidPIName, CreateName(prefix, localName));
577if (throwOnError) throw new XmlException(SR.XmlNoNameAllowed, nodeKind.ToString());
System\Xml\XmlConvert.cs (10)
333return new XmlException(SR.Xml_EmptyName, string.Empty);
339return new XmlException(endPos == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
414throw new XmlException(SR.Sch_NotTokenString, token);
431return new XmlException(SR.Sch_NotTokenString, token);
469return new XmlException(SR.Xml_EmptyName, string.Empty);
475return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
527throw new XmlException(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(content, pos), 0, pos + 1);
1537return new XmlException(res, string.Empty, lineNo, linePos);
1554return new XmlException(res, arg, lineNo, linePos);
1571return new XmlException(res, args, lineNo, linePos);
System.ServiceModel.Syndication (25)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (6)
110throw new XmlException(SR.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI));
561_ => throw new XmlException(FeedUtils.AddLineInfo(reader, SR.Format(SR.Atom10SpecRequiresTextConstruct, context, type))),
814throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e);
818throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e);
895throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e);
899throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e);
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (5)
110throw new XmlException(SR.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI));
491throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e);
495throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingItem), e);
796throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e);
800throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingFeed), e);
System.Windows.Forms (5)
System.Xaml (1)
295 references to XmlException
Aspire.Dashboard (1)
CSharpSyntaxGenerator (3)
illink (3)
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
Microsoft.Build (12)
Microsoft.Build.Engine.OM.UnitTests (3)
Microsoft.Build.Engine.UnitTests (1)
Microsoft.Build.Tasks.Core (24)
Microsoft.Build.Utilities.Core (4)
Microsoft.CodeAnalysis (7)
Microsoft.CodeAnalysis.CSharp (5)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.Maui.Graphics (1)
MSBuild (3)
MSBuildTaskHost (3)
netstandard (1)
PresentationBuildTasks (6)
PresentationCore (1)
PresentationFramework (10)
ReachFramework (24)
System.Configuration.ConfigurationManager (4)
System.IO.Packaging (14)
System.Private.DataContractSerialization (14)
System.Private.Xml (106)
System\Xml\Core\XmlTextReaderImpl.cs (22)
2512catch (XmlException e)
2719XmlException? xmlEx = e as XmlException;
2756Throw(invCharPos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos));
4334Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
4436Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
4760Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
4807Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
5178Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
5998catch (XmlException)
6239Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos));
7291Throw((_ps.chars[startPos + 2] == 'x') ? startPos + 3 : startPos + 2, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(ch, '\0'));
7317Throw((_ps.chars[startPos + 2] == 'x') ? startPos + 3 : startPos + 2, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(high, low));
7532Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
7557Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
7602catch (XmlException)
8186catch (XmlException e)
8505catch (XmlException e)
8609Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
8730catch (XmlException e)
9369catch (XmlException e)
9404catch (XmlException e)
System\Xml\Core\XmlTextReaderImplAsync.cs (13)
784catch (XmlException e)
1898Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2035Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
2393Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
2440Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2688Throw(pos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
3781catch (XmlException)
3943Throw(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_ps.chars, _ps.charsUsed, _ps.charPos));
5007Throw(pos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(chars, _ps.charsUsed, pos));
5032Throw(pos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
5081catch (XmlException)
5377catch (XmlException e)
5416catch (XmlException e)
System\Xml\Core\XmlWellFormedWriter.cs (5)
393throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid));
400throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid));
407throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
1834private static XmlException DupAttrException(string prefix, string localName)
2062string[] badCharArgs = XmlException.BuildCharExceptionArgs(name, badCharIndex);
System\Xml\Schema\DtdParser.cs (8)
1381catch (XmlException e)
2496Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
2629catch (XmlException e)
2999Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
3023Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
3085Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
3481Throw(pos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, invCharPos));
3486Throw(invCharPos, SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos));
System\Xml\Schema\DtdParserAsync.cs (5)
1002catch (XmlException e)
1942Throw(_curPos, SR.Xml_BadAttributeChar, XmlException.BuildCharExceptionArgs('<', '\0'));
2413Throw(_curPos, SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
2436Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2498Throw(_curPos, SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(_chars, _charsUsed, _curPos));
System\Xml\ValidateNames.cs (5)
381throw new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
386throw new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
401return new XmlException(SR.Xml_BadStartNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
406return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(s, offsetBadChar));
609throw new ArgumentException(SR.Format(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')), nameof(name));
System\Xml\XmlConvert.cs (9)
339return new XmlException(endPos == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
355throw CreateException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos), exceptionType, 0, endPos + 1);
459throw CreateException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos), exceptionType, 0, endPos + 1);
475return new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
527throw new XmlException(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(content, pos), 0, pos + 1);
1611return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, length, invCharPos), exceptionType, 0, invCharPos + 1);
1621return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(data, invCharPos), exceptionType, 0, invCharPos + 1);
1631return CreateException(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(invChar, nextChar), exceptionType);
1636return CreateException(index == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, index), exceptionType, 0, index + 1);
System.Runtime.Serialization.Schema (1)
System.Security.Cryptography.Xml (1)
System.ServiceModel.NetFramingBase (2)
System.ServiceModel.Syndication (5)
System.Windows.Forms (5)
System.Windows.Forms.Tests (1)
System.Xml (1)
System.Xml.ReaderWriter (1)