151 references to 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));
PresentationFramework (20)
MS\Internal\IO\Packaging\XamlFilter.cs (1)
780throw new XmlException(SR.XamlFilterNestedFixedPage);
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\Windows\Annotations\AnnotationResource.cs (3)
194throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Resource)); 459throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Resource)); 466throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, AnnotationXmlConstants.Elements.Resource));
System\Windows\Annotations\LocatorGroup.cs (1)
146throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.ContentLocatorGroup));
System\Windows\Annotations\LocatorPartList.cs (6)
222throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.ContentLocator)); 255throw new XmlException(SR.Format(SR.UnexpectedAttribute, reader.LocalName, AnnotationXmlConstants.Elements.Item)); 262throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.ItemName, AnnotationXmlConstants.Elements.Item)); 266throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.ItemValue, AnnotationXmlConstants.Elements.Item)); 282throw new XmlException(SR.Format(SR.InvalidXmlContent, AnnotationXmlConstants.Elements.Item)); 293throw new XmlException(SR.Format(SR.InvalidXmlContent, part.PartType.Name));
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
567throw new XmlException(SR.Format(SR.RequiredAttributeMissing, AnnotationXmlConstants.Attributes.Id, AnnotationXmlConstants.Elements.Annotation));
System.IO.Packaging (1)
System\IO\Packaging\InternalRelationshipCollection.cs (1)
616throw new XmlException(SR.Format(SR.NotAUniqueRelationshipId, id));
System.Private.DataContractSerialization (99)
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 (7)
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);
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 (20)
105throw new XmlException(SR.XmlDeclarationRequired); 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); 499throw new XmlException(SR.Format(SR.XmlExpectedEncoding, GetEncodingName(expEnc), GetEncodingName(actualEnc))); 509throw new XmlException(SR.Format(SR.XmlEncodingMismatch, declEnc, docEnc)); 642throw new XmlException(SR.UnexpectedEndOfFile); 663throw new XmlException(SR.UnexpectedEndOfFile);
System\Xml\XmlBaseReader.cs (11)
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)));
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 (2)
39throw new XmlException(s); 50throw new XmlException(s);
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 (16)
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
2789throw new XmlException(SR.XmlBin_MissingEndCDATA);
System\Xml\Core\XmlTextReaderImpl.cs (1)
9013throw new XmlException(SR.Xml_NametableMismatch);
System\Xml\Core\XmlTextReaderImplAsync.cs (1)
3455throw new XmlException(SR.Xml_InternalError);
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\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 (1)
374throw new XmlException(SR.Format(SR.Xml_EmptyName, string.Empty));
System\Xml\XmlException.cs (1)
85public XmlException() : this(null)
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\Xsl\Xslt\XPathPatternBuilder.cs (2)
325throw new XmlException(SR.Xml_InternalError); 330throw new XmlException(SR.Xml_InternalError);
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\CryptoSignedXmlRecursionException.cs (1)
21public CryptoSignedXmlRecursionException(string message) : base(message) { }
System.ServiceModel.Syndication (11)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (2)
110throw new XmlException(SR.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI)); 561_ => throw new XmlException(FeedUtils.AddLineInfo(reader, SR.Format(SR.Atom10SpecRequiresTextConstruct, context, type))),
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
102throw new XmlException(SR.Format(SR.UnknownItemXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (1)
109throw new XmlException(SR.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
96throw new XmlException(SR.Format(SR.UnknownDocumentXml, reader.LocalName, reader.NamespaceURI));
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
110throw new XmlException(SR.Format(SR.UnknownFeedXml, reader.LocalName, reader.NamespaceURI));
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 (2)
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));