1 type derived from XmlException
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\CryptoSignedXmlRecursionException.cs (1)
18public class CryptoSignedXmlRecursionException : XmlException
475 instantiations of XmlException
Microsoft.Build (3)
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (3)
93throw new XmlException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("UnrecognizedElement", reader.Name)); 136throw new XmlException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("UnrecognizedElement", reader.Name)); 146throw new XmlException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("UnrecognizedElement", reader.Name));
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
1467throw new XmlException(string.Format(CultureInfo.InvariantCulture, message, args), null, info == null ? 1 : info.LineNumber,
PresentationFramework (20)
MS\Internal\IO\Packaging\XamlFilter.cs (1)
786throw new XmlException(SR.XamlFilterNestedFixedPage);
System\Windows\Annotations\Annotation.cs (8)
333throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Annotation)); 348throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Annotation)); 558throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, elementName)); 668throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Annotation)); 676throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, AnnotationXmlConstants.Elements.Annotation)); 680throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.CreationTime, AnnotationXmlConstants.Elements.Annotation)); 684throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.LastModificationTime, AnnotationXmlConstants.Elements.Annotation)); 688throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.TypeName, AnnotationXmlConstants.Elements.Annotation));
System\Windows\Annotations\AnnotationResource.cs (3)
200throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Resource)); 465throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Resource)); 472throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, AnnotationXmlConstants.Elements.Resource));
System\Windows\Annotations\LocatorGroup.cs (1)
152throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.ContentLocatorGroup));
System\Windows\Annotations\LocatorPartList.cs (6)
229throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.ContentLocator)); 262throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Item)); 269throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.ItemName, AnnotationXmlConstants.Elements.Item)); 273throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.ItemValue, AnnotationXmlConstants.Elements.Item)); 289throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Item)); 300throw new XmlException(SR.Format(SR.InvalidXmlContent, part.PartType.Name));
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
578throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, 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\PackageRelationship.cs (1)
144throw new XmlException(SR.Format(SR.NotAValidXmlIdString, id), exception);
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\XmlCompatibilityReader.cs (1)
1409throw new XmlException(string.Format(CultureInfo.InvariantCulture, message, args), null, info == null ? 1 : info.LineNumber,
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\ExtensionDataReader.cs (4)
160throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 251throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 325throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 652throw new XmlException(SR.Format(SR.InvalidDataNode, DataContract.GetClrTypeFullName(type)));
System\Runtime\Serialization\Json\ByteArrayHelperWithString.cs (1)
47throw new XmlException(SR.Format(SR.XmlInvalidConversion, value, type));
System\Runtime\Serialization\Json\JsonEncodingStreamWrapper.cs (10)
155throw new XmlException(SR.JsonInvalidBytes, e); 219throw new XmlException(SR.JsonInvalidBytes, ex); 291_ => throw new XmlException(SR.JsonEncodingNotSupported), 300_ => throw new XmlException(SR.JsonEncodingNotSupported), 323throw new XmlException(SR.JsonEncodingNotSupported); 341throw new XmlException(SR.JsonInvalidBytes); 351throw new XmlException(SR.Format(SR.JsonExpectedEncoding, GetEncodingName(expEnc), GetEncodingName(actualEnc))); 366throw new XmlException(SR.JsonUnexpectedEndOfFile); 389throw new XmlException(SR.JsonUnexpectedEndOfFile); 458throw new XmlException(SR.JsonInvalidBytes, ex);
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (1)
70throw new XmlException(SR.Format(SR.XmlInvalidConversion, value, Globals.TypeOfInt));
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (4)
95throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement")); 266throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, "UInt64"))); 292throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement")); 299throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, "UInt64")));
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\Runtime\Serialization\XmlReaderDelegator.cs (2)
338throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, type))); 344throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement"));
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\ValueHandle.cs (1)
463throw new XmlException(exception.Message, exception.InnerException);
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\Xml\XmlConverter.cs (1)
459throw new XmlException(SR.Format(SR.XmlInvalidQualifiedName, qname));
System\Xml\XmlDictionaryWriter.cs (1)
197throw new XmlException(SR.XmlInvalidStream);
System\Xml\XmlExceptionHelper.cs (5)
39throw new XmlException(s); 50throw new XmlException(s); 306return new XmlException(SR.Format(SR.XmlInvalidConversionWithoutValue, type), exception); 311return new XmlException(SR.Format(SR.XmlInvalidConversion, value, type), exception); 321return new XmlException(SR.Format(SR.XmlInvalidUTF8Bytes, value), exception);
System\Xml\XmlUTF8TextReader.cs (6)
866XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlSpaceBetweenAttributes)); 899XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 1035XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidCommentChars)); 1168XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 1326XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCDATAInvalidAtTopLevel)); 1369XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCloseCData));
System.Private.Xml (274)
System\Xml\Base64Decoder.cs (2)
147throw new XmlException(SR.Xml_InvalidBase64Value, chars.ToString()); 180throw new XmlException(SR.Xml_InvalidBase64Value, chars.ToString());
System\Xml\BinaryXml\SqlUtils.cs (6)
49_ => throw new XmlException(SR.XmlBinary_InvalidSqlDecimal, (string[]?)null), 143throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null); 450throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null); 475throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null); 493throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null); 763throw new XmlException(SR.SqlTypes_ArithOverflow, (string?)null);
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\BinHexDecoder.cs (2)
121throw new XmlException(SR.Xml_InvalidBinHexValueOddCount, new string(chars)); 165throw new XmlException(SR.Xml_InvalidBinHexValue, chars.ToString());
System\Xml\Core\QueryOutputWriter.cs (2)
155throw new XmlException(SR.Xml_NoMultipleRoots, string.Empty); 331throw new XmlException(SR.Xml_NoRoot, string.Empty);
System\Xml\Core\ReadContentAsBinaryHelper.cs (3)
244throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo); 291throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo); 403throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (3)
199throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo); 239throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo); 325throw new XmlException(SR.Xml_InvalidNodeType, _reader.NodeType.ToString(), _reader as IXmlLineInfo);
System\Xml\Core\XmlCharCheckingReader.cs (2)
581throw new XmlException(res, arg, (IXmlLineInfo?)null); 587throw new XmlException(res, args, (IXmlLineInfo?)null);
System\Xml\Core\XmlParserContext.cs (1)
59throw new XmlException(SR.Xml_NotSameNametable, string.Empty);
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\XmlReaderAsync.cs (4)
65throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo); 69throw new XmlException(SR.Xml_ReadContentAsFormatException, returnType.ToString(), e, this as IXmlLineInfo); 393throw new XmlException(SR.Xml_MixedReadElementContentAs, string.Empty, this as IXmlLineInfo); 402throw new XmlException(SR.Xml_InvalidNodeType, NodeType.ToString());
System\Xml\Core\XmlReaderSettings.cs (1)
400throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
System\Xml\Core\XmlSubtreeReader.cs (4)
933throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 1070throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 1391throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 1420throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
System\Xml\Core\XmlSubtreeReaderAsync.cs (4)
339throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 476throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 575throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo); 604throw new XmlException(SR.Xml_InvalidNodeType, reader.NodeType.ToString(), reader as IXmlLineInfo);
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\XmlTextReaderImplAsync.cs (4)
81throw new XmlException(SR.Xml_CannotResolveUrl, _laterInitParam.inputUriStr); 3455throw new XmlException(SR.Xml_InternalError); 5139Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0)); 5467throw new XmlException(SR.Xml_InvalidNodeType, _curNode.type.ToString(), this as IXmlLineInfo);
System\Xml\Core\XmlTextReaderImplHelpers.cs (2)
755throw new XmlException(SR.Xml_DefaultException, string.Empty); 774throw new XmlException(SR.Xml_DefaultException, string.Empty);
System\Xml\Core\XmlValidatingReaderImpl.cs (1)
985throw new XmlException(SR.Xml_InvalidNodeType, _outerReader.NodeType.ToString());
System\Xml\Core\XmlWellFormedWriter.cs (5)
506throw new XmlException(SR.Xml_NoStartTag, string.Empty); 557throw new XmlException(SR.Xml_NoStartTag, string.Empty); 1601throw new XmlException(SR.Xml_RedefinePrefix, new string[] { prefix, _nsStack[existingNsIndex].namespaceUri, ns }); 1681throw new XmlException(SR.Xml_RedefinePrefix, new string?[] { prefix, _nsStack[existingNsIndex].namespaceUri, ns }); 1837return new XmlException(SR.Xml_DupAttributeName, attr);
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
338throw new XmlException(SR.Xml_NoStartTag, string.Empty); 417throw new XmlException(SR.Xml_NoStartTag, string.Empty);
System\Xml\Core\XmlWriter.cs (1)
327throw new XmlException(SR.Xml_InvalidPosition, string.Empty);
System\Xml\Core\XmlWriterAsync.cs (1)
248throw new XmlException(SR.Xml_InvalidPosition, string.Empty);
System\Xml\Core\XmlWriterSettings.cs (1)
494throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
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\Dom\DocumentXmlWriter.cs (1)
443throw new XmlException(SR.Xml_DupAttributeName, attr.Prefix.Length == 0 ? attr.LocalName : $"{attr.Prefix}:{attr.LocalName}");
System\Xml\Dom\XmlDocument.cs (2)
210throw new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos)); 1392throw new XmlException(SR.Xml_InvalidXmlDocument, SR.Xdom_NoRootEle);
System\Xml\Dom\XmlLoader.cs (2)
616throw new XmlException(SR.Xml_InternalError, string.Empty); 922throw new XmlException(SR.Xml_UndeclaredParEntity, eref.Name);
System\Xml\HWStack.cs (1)
34throw new XmlException(SR.Xml_StackOverflow, string.Empty);
System\Xml\Resolvers\XmlPreloadedResolver.cs (3)
33throw new XmlException(SR.Xml_UnsupportedClass); 237throw new XmlException(SR.Format(SR.Xml_CannotResolveUrl, absoluteUri)); 250throw new XmlException(SR.Xml_UnsupportedClass);
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (2)
30throw new XmlException(SR.Format(SR.Xml_CannotResolveUrl, absoluteUri)); 43throw new XmlException(SR.Xml_UnsupportedClass);
System\Xml\Schema\BaseValidator.cs (1)
141throw new XmlException(SR.Xml_InternalError, string.Empty);
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\Schema\DtdValidator.cs (2)
446throw new XmlException(SR.Xml_UndeclaredEntity, n); 451throw new XmlException(SR.Xml_UnparsedEntityRef, n);
System\Xml\Schema\XdrBuilder.cs (2)
464throw new XmlException(SR.Xml_UnexpectedToken, "NAME"); 1580throw new XmlException(SR.Xml_UnexpectedToken, "NAME");
System\Xml\Schema\XdrValidator.cs (1)
392throw new XmlException(SR.Xml_MultipleValidationTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition);
System\Xml\Schema\XsdValidator.cs (1)
635throw new XmlException(SR.Xml_MultipleValidationTypes, string.Empty, this.PositionInfo.LineNumber, this.PositionInfo.LinePosition);
System\Xml\Serialization\Xmlcustomformatter.cs (2)
75throw new XmlException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 254throw new XmlException(SR.Format(SR.XmlUnsupportedDefaultValue, formatter));
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\Xml\XmlEncoding.cs (4)
535throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty); 576throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty); 618throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty); 660throw new XmlException(SR.Xml_InvalidCharInThisEncoding, string.Empty);
System\Xml\XmlQualifiedName.cs (1)
157throw new XmlException(SR.Xml_UnknownNs, prefix);
System\Xml\XmlResolver.FileSystemResolver.cs (2)
37throw new XmlException(SR.Xml_UnsupportedClass, string.Empty); 50throw new XmlException(SR.Xml_UnsupportedClass, string.Empty);
System\Xml\XmlResolver.ThrowingResolver.cs (2)
40throw new XmlException(SR.Format(SR.Xml_NullResolver, absoluteUri)); 45throw new XmlException(SR.Format(SR.Xml_NullResolver, absoluteUri));
System\Xml\XmlUrlResolver.cs (2)
46throw new XmlException(SR.Xml_UnsupportedClass, string.Empty); 57throw new XmlException(SR.Xml_UnsupportedClass, string.Empty);
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (2)
325throw new XmlException(SR.Xml_InternalError); 330throw new XmlException(SR.Xml_InternalError);
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\Atom10ItemFormatter.cs (1)
102throw new XmlException(SR.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (3)
109throw new XmlException(SR.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI)); 169throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); 173throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e);
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (3)
96throw new XmlException(SR.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI)); 494throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), e); 498throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDocument), 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\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
125throw new XmlException(SR.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
432throw new XmlException(SR.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (4)
440throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingUri), e); 466throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDateTime), e); 469throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingDateTime)); 586throw new XmlException(s);
System\ServiceModel\Syndication\SyndicationItem.cs (1)
178throw new XmlException(SR.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI));
System.Windows.Forms (5)
System\Resources\ResXDataNode.cs (2)
377XmlException xml = new(newMessage, nse, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X); 393new XmlException(newMessage, null, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X));
System\Resources\ResXResourceReader.cs (3)
381XmlException xml = new(newMessage, se, pt.Y, pt.X); 388XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 404XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
1467throw new XmlException(string.Format(CultureInfo.InvariantCulture, message, args), null, info == null ? 1 : info.LineNumber,
289 references to XmlException
Aspire.Dashboard (1)
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
129catch (XmlException)
CSharpSyntaxGenerator (3)
SourceGenerator.cs (3)
79catch (InvalidOperationException ex) when (ex.InnerException is XmlException) 81var xmlException = (XmlException)ex.InnerException;
illink (3)
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
XmlSerializerInputFormatter.cs (1)
155exception.InnerException is XmlException)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
XmlDataContractSerializerInputFormatterTest.cs (4)
229await Assert.ThrowsAsync<XmlException>(() => formatter.ReadAsync(context)); 357await Assert.ThrowsAsync<XmlException>(() => formatter.ReadAsync(context)); 479var expectedException = typeof(XmlException); 503var expectedException = typeof(XmlException);
XmlSerializerInputFormatterTest.cs (4)
182await Assert.ThrowsAsync<XmlException>(() => formatter.ReadAsync(context)); 226await Assert.ThrowsAsync<XmlException>(() => formatter.ReadAsync(context)); 497var expectedException = typeof(XmlException); 523var expectedException = typeof(XmlException);
Microsoft.Build (12)
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (1)
197catch (XmlException e)
BuildEventFileInfo.cs (2)
85internal BuildEventFileInfo(XmlException e) 98internal BuildEventFileInfo(string file, XmlException e) : this(e)
Construction\ProjectRootElement.cs (2)
2089BuildEventFileInfo fileInfo = ex is XmlException xmlException 2113catch (XmlException ex)
Construction\Solution\ProjectInSolution.cs (1)
378catch (XmlException)
Construction\Solution\SolutionFile.cs (1)
1242catch (XmlException e)
Definition\Toolset.cs (1)
1046catch (XmlException e)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
Utilities\Utilities.cs (1)
93catch (XmlException)
Microsoft.Build.Engine.OM.UnitTests (3)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
Microsoft.Build.Engine.UnitTests (1)
Evaluation\Evaluator_Tests.cs (1)
4385catch (XmlException)
Microsoft.Build.Tasks.Core (20)
AppConfig\AppConfig.cs (1)
42catch (XmlException e)
AssemblyDependency\GenerateBindingRedirects.cs (1)
120catch (System.Xml.XmlException)
AssignProjectConfiguration.cs (1)
242catch (XmlException e)
BootstrapperUtil\BootstrapperBuilder.cs (4)
549catch (XmlException ex) 852catch (XmlException ex) 1050catch (XmlException ex) 2024catch (XmlException)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
GenerateResource.cs (2)
2611if (ae.InnerException is XmlException xe) 2630catch (XmlException xe)
ManifestUtil\AssemblyIdentity.cs (2)
203catch (XmlException) 222catch (XmlException)
RedistList.cs (1)
698catch (XmlException ex)
ResGenDependencies.cs (1)
254/// <exception cref="XmlException">May be thrown if Resx is invalid</exception>
ResolveNonMSBuildProjectOutput.cs (1)
146catch (XmlException e)
XmlPeek.cs (1)
184catch (XmlException xe)
XmlPoke.cs (1)
170catch (XmlException xe)
XslTransformation.cs (1)
222catch (XmlException xe)
Microsoft.Build.Utilities.Core (4)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
ToolLocationHelper.cs (1)
3164catch (XmlException ex)
Microsoft.CodeAnalysis (7)
Desktop\DesktopAssemblyIdentityComparer.cs (1)
50/// <exception cref="System.Xml.XmlException">The stream doesn't contain a well formed XML.</exception>
Diagnostic\XmlLocation.cs (1)
27public static XmlLocation Create(XmlException exception, string path)
DocumentationComments\DocumentationCommentIncludeCache.cs (1)
47/// <exception cref="XmlException"></exception>
DocumentationComments\XmlDocumentationCommentTextReader.cs (4)
26public static XmlException ParseAndGetException(string text) 29var retVal = reader.ParseInternal(text); 37internal XmlException ParseInternal(string text) 63catch (XmlException ex)
Microsoft.CodeAnalysis.CSharp (5)
Compiler\DocumentationCommentCompiler.cs (3)
557XmlException e = XmlDocumentationCommentTextReader.ParseAndGetException(formattedXml); 1348private static string GetDescription(XmlException e) 1353ResourceManager manager = new ResourceManager("System.Xml", typeof(XmlException).GetTypeInfo().Assembly);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
100catch (XmlException e) 399catch (XmlException e)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
3355Assert.Throws<XmlException>(() => XElement.Parse(xml));
Microsoft.CodeAnalysis.UnitTests (4)
MetadataReferences\AssemblyPortabilityPolicyTests.cs (4)
81Assert.Throws<XmlException>(() => AssemblyPortabilityPolicy.LoadFromXml(stream)); 90Assert.Throws<XmlException>(() => AssemblyPortabilityPolicy.LoadFromXml(stream)); 106Assert.Throws<XmlException>(() => AssemblyPortabilityPolicy.LoadFromXml(stream)); 128Assert.Throws<XmlException>(() => AssemblyPortabilityPolicy.LoadFromXml(stream));
Microsoft.CodeAnalysis.VisualBasic (5)
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (1)
586Dim ex As XmlException = XmlDocumentationCommentTextReader.ParseAndGetException(formattedAfterIncludes)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (2)
179Catch ex As XmlException 537Catch ex As XmlException
Compilation\DocumentationComments\DocumentationCommentCompiler.TextUtils.vb (2)
134Private Shared Function GetDescription(e As XmlException) As String 137Dim manager As New ResourceManager("System.Xml", GetType(XmlException).GetTypeInfo().Assembly)
Microsoft.CodeAnalysis.Workspaces (2)
Shared\Extensions\ISymbolExtensions.cs (2)
247catch (XmlException) 452catch (XmlException)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
305catch (Exception e) when (e is IOException or XmlException)
Microsoft.DotNet.XliffTasks (1)
Tasks\UpdateXlf.cs (1)
51catch (System.Xml.XmlException xmlEx)
Microsoft.Gen.Metrics (1)
Parser.cs (1)
359catch (XmlException ex)
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
359catch (XmlException ex)
MSBuild (5)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
ProjectSchemaValidationHandler.cs (2)
113catch (XmlException) 133catch (XmlException e)
MSBuildTaskHost (3)
ExceptionHandling.cs (3)
177return e is XmlException 194var xmlException = e as XmlException;
netstandard (1)
netstandard.cs (1)
2476[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlException))]
PresentationBuildTasks (6)
MS\Internal\Tasks\CompilerWrapper.cs (1)
333if (e is System.Xml.XmlException)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (3)
228if (e is XmlException) 230XmlException xmlEx = (XmlException)e;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
419catch (XmlException e) 1393!typeof(System.Xml.XmlException).IsAssignableFrom(innerException.GetType()))
PresentationCore (1)
MS\Internal\FontFace\CompositeFontParser.cs (1)
201catch (XmlException x)
PresentationFramework (10)
MS\Internal\Globalization\BamlTreeMap.cs (1)
373catch (XmlException)
MS\Internal\Globalization\BamlTreeUpdater.cs (1)
457catch (XmlException)
MS\Internal\IO\Packaging\XamlFilter.cs (1)
243catch (XmlException xmlException)
System\Windows\Annotations\Storage\XmlStreamStore.cs (3)
72/// <exception cref="XmlException">stream contains invalid XML</exception> 98/// <exception cref="XmlException">stream contains invalid XML</exception> 730/// <exception cref="XmlException">if the stream contains invalid XML</exception>
System\Windows\Data\XmlDataProvider.cs (1)
492catch (XmlException xmle)
System\Windows\Markup\XamlReader.cs (3)
531else if (e is XmlException) 533XmlException xe = (XmlException)e;
ReachFramework (24)
Packaging\XpsDocument.cs (1)
336catch (XmlException)
PrintConfig\DocumentNUp.cs (1)
174/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\FallbackPTProvider.cs (1)
111catch (XmlException xmlException)
PrintConfig\JobInputBins.cs (1)
160/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\JobStaple.cs (1)
161/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PageCanvasSize.cs (1)
187/// <exception cref="XmlException">XML parser finds non-well-formness of XML</exception>
PrintConfig\PageMediaSize.cs (1)
200/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PageMediaType.cs (1)
169/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PageOutputColor.cs (1)
169/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PageResolution.cs (1)
192/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PageScaling.cs (1)
284/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PrintSchema.cs (1)
2341/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PrtCap_Base.cs (1)
302/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PrtCap_Builder.cs (4)
52/// <exception cref="XmlException">XML is not well-formed.</exception> 114/// <exception cref="XmlException">XML is not well-formed.</exception> 284/// <exception cref="XmlException">XML is not well-formed.</exception> 355/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PrtCap_Public.cs (1)
86catch (XmlException e)
PrintConfig\PrtCap_Reader.cs (5)
121/// <exception cref="XmlException">XML is not well-formed.</exception> 291/// <exception cref="XmlException">XML is not well-formed.</exception> 311/// <exception cref="XmlException">XML is not well-formed.</exception> 341/// <exception cref="XmlException">XML is not well-formed.</exception> 366/// <exception cref="XmlException">XML is not well-formed.</exception>
PrintConfig\PrtTicket_Public.cs (1)
108catch (XmlException e)
System.Configuration.ConfigurationManager (4)
System\Configuration\BaseConfigurationRecord.cs (1)
588catch (XmlException e)
System\Configuration\ExceptionUtil.cs (2)
63XmlException xe = e as XmlException;
System\Configuration\NameValueFileSectionHandler.cs (1)
51catch (XmlException e)
System.IO.Packaging (14)
System\IO\Packaging\InternalRelationshipCollection.cs (2)
159catch (XmlException exception) 219/// <exception cref="XmlException">Thrown if XML is malformed</exception>
System\IO\Packaging\Package.cs (5)
600/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 601/// <exception cref="System.Xml.XmlException">If an id is provided in the method, and its not unique</exception> 620/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 683/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 705/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception>
System\IO\Packaging\PackagePart.cs (5)
406/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 407/// <exception cref="System.Xml.XmlException">If an id is provided in the method, and its not unique</exception> 427/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 494/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception> 517/// <exception cref="System.Xml.XmlException">If parameter "id" is not a valid Xsd Id</exception>
System\IO\Packaging\PackageRelationship.cs (1)
142catch (XmlException exception)
System\IO\Packaging\PackageRelationshipSelector.cs (1)
27/// <exception cref="System.Xml.XmlException">If PackageRelationshipSelectorType.Id and selection criteria is not valid Xsd Id</exception>
System.Private.DataContractSerialization (14)
System\Runtime\Serialization\DataContract.cs (1)
1212catch (XmlException)
System\Runtime\Serialization\PrimitiveDataContract.cs (1)
926catch (XmlException xes)
System\Runtime\Serialization\XmlObjectSerializer.cs (6)
102catch (XmlException ex) 170catch (XmlException ex) 192catch (XmlException ex) 212catch (XmlException ex) 358catch (XmlException ex) 378catch (XmlException ex)
System\Xml\XmlExceptionHelper.cs (5)
43public static void ThrowXmlException(XmlDictionaryReader reader, XmlException exception) 304public static XmlException CreateConversionException(string type, Exception exception) 309public static XmlException CreateConversionException(string value, string type, Exception exception) 314public static XmlException CreateEncodingException(byte[] buffer, int offset, int count, Exception exception) 319public static XmlException CreateEncodingException(string value, Exception exception)
System\Xml\XmlUTF8TextReader.cs (1)
660catch (XmlException exception)
System.Private.Xml (106)
System\Xml\BinaryXml\XmlBinaryReader.cs (3)
4394private XmlException CreateUnexpectedTokenException(BinXmlToken token) 4400private XmlException CreateXmlException(string res) 4406private XmlException CreateXmlException(string res, string arg1, string arg2)
System\Xml\Core\XmlCharCheckingReader.cs (2)
319Throw(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(str, i)); 595Throw(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(value, i));
System\Xml\Core\XmlCharCheckingReaderAsync.cs (1)
180Throw(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(str, i));
System\Xml\Core\XmlCharCheckingWriter.cs (3)
229throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i))); 344throw new ArgumentException(SR.Format(len == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(ncname, len))); 360throw new ArgumentException(string.Format(res, XmlException.BuildCharExceptionArgs(name, len)));
System\Xml\Core\XmlCharCheckingWriterAsync.cs (1)
175throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i)));
System\Xml\Core\XmlEncodedRawTextWriter.cs (1)
1871error = SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(chars, i));
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\XmlUtf8RawTextWriter.cs (1)
1733error = SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(chars, i));
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\Core\XmlWellFormedWriterAsync.cs (3)
94throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 101throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 108throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
System\Xml\Dom\XmlDocument.cs (1)
210throw new XmlException(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(name, endPos));
System\Xml\Schema\DataTypeImplementation.cs (3)
2431catch (XmlException e) 2724catch (XmlException e) 3057catch (XmlException e)
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\Schema\Preprocessor.cs (4)
1890catch (XmlException eInner) 2052catch (XmlException ex) 2087string[] invCharArgs = XmlException.BuildCharExceptionArgs(name, len); 2116catch (XmlException ex)
System\Xml\Schema\SchemaCollectionpreProcessor.cs (1)
1746string[] invCharArgs = XmlException.BuildCharExceptionArgs(name, len);
System\Xml\Schema\XdrBuilder.cs (1)
532catch (XmlException e)
System\Xml\Schema\XmlValueConverter.cs (2)
614catch (XmlException e) 632catch (XmlException e)
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\Xml\XmlResolver.ThrowingResolver.cs (1)
18/// and will result in <see cref="XmlException"/> being thrown.
System\Xml\Xsl\IlGen\XmlILTrace.cs (1)
140if (!XmlException.IsCatchableException(e))
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (1)
294if (!XmlException.IsCatchableException(e))
System\Xml\Xsl\Runtime\XmlQueryContext.cs (1)
152if (!XmlException.IsCatchableException(e))
System\Xml\Xsl\Xslt\Compiler.cs (3)
207catch (XmlException e) 224catch (XmlException e) 243catch (XmlException e)
System\Xml\Xsl\Xslt\QilGenerator.cs (1)
175if (!XmlException.IsCatchableException(e))
System\Xml\Xsl\Xslt\XsltLoader.cs (3)
269if (!XmlException.IsCatchableException(e)) 275XmlException? ex = e as XmlException;
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (1)
844if (!XmlException.IsCatchableException(e))
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
120catch (XmlException)
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\SignedXml.cs (1)
566catch (XmlException)
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\SessionConnectionReader.cs (1)
280catch (XmlException xmlException)
System\ServiceModel\Channels\SingletonConnectionReader.cs (1)
191catch (XmlException xmlException)
System.ServiceModel.Syndication (5)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (3)
287catch (XmlException e) 335catch (XmlException e) 368catch (XmlException e)
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
407catch (XmlException e) 708catch (XmlException e)
System.Windows.Forms (5)
System\Resources\ResXDataNode.cs (1)
377XmlException xml = new(newMessage, nse, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X);
System\Resources\ResXResourceReader.cs (4)
381XmlException xml = new(newMessage, se, pt.Y, pt.X); 388XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 391catch (XmlException e) 404XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System.Windows.Forms.Tests (1)
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
115Assert.Throws<XmlException>(() => converter.ConvertFrom(value));
System.Xml (1)
System.Xml.cs (1)
205[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlException))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
133[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlException))]