dotnet / dotnet/dotnet-api-docs
Load(XmlReader) when XmlReader was newly created with .ReadSubtree()
- Lingua principale
- C#
- Stelle
- 949
- Fork
- 1.7k
- Merge medio
- 2g 19h
- PR unite (30g)
- 52
Descrizione
Documentation should note that when calling XElement.Load(subReader) where subReader was previously created with subReader= myReader.ReadSubtree() you may receive an error "The XmlReader state should be EndOfFile after this operation.".
To work around this problem, you can call XElement.Load(subReader.ReadSubtree())
See: https://stackoverflow.com/a/5510781
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 7a68c44a-8022-ea78-b925-8c9f3bb84086
* Version Independent ID: 7daa0c33-a14d-5f14-8ece-b85903f94d0e
* Content: [XElement.Load Method (System.Xml.Linq)](https://docs.microsoft.com/en-us/dotnet/api/system.xml.linq.xelement.load?view=netframework-4.7.2)
* Content Source: [xml/System.Xml.Linq/XElement.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Xml.Linq/XElement.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Esamina la documentazione di XElement.Load in xml/System.Xml.Linq/XElement.xml, in particolare l’overload descritto nell’issue. Verifica lo scenario ReadSubtree e documenta l’errore segnalato e la soluzione alternativa; il lavoro è completato quando la pagina dell’API spiega chiaramente sia la situazione sia la chiamata suggerita.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 50/100