xmlreader Questions
3
Solved
Does anyone know how I can get the current line number of an System.Xml.XmlReader? I am trying to record where in a file I find Xml elements.
Koblenz asked 7/3, 2009 at 0:58
4
Solved
I have a 150 MB XML file which is used as DB in my project. Currently I'm using XmlReader to read content from it. I want to know if it is better to use XmlReader or LINQ to XML for this scenario.
...
Phthalocyanine asked 29/4, 2010 at 7:20
3
I'm trying use XMLReaderFactory, but this is deprecated.
Now, how Can I create a instance of XMLReader?
4
Solved
I am writing an XML validator with XSD.
Below is what I did, but when the validator reached the line while (list.Read()) it gives me the error
There is no Unicode byte order mark. Cannot switc...
Drumfish asked 28/4, 2015 at 9:25
5
Solved
I have the following XML Parsing code in my application:
public static XElement Parse(string xml, string xsdFilename)
{
var readerSettings = new XmlReaderSettings
{
ValidationType = Validatio...
Veridical asked 23/6, 2010 at 17:47
4
Solved
I am reading rss with xml reader.
And when url is bad it takes 60 seconds to fail for it. How i can specify timeout?
using (XmlReader reader = XmlReader.Create(url, settings))
4
Solved
xml:19558: parser error : XML declaration allowed only at the start of the document
any solutions? i am using php XMLReader to parse a large XML file, but getting this error. i know the file is no...
5
I am using a third-party DLL which transmits an XML document over the internet.
Why would the DLL be throwing the following exception?
Data at the root level is invalid. Line 1, position 1. (se...
Pantry asked 30/7, 2013 at 12:38
7
Solved
6
Solved
I got this scenario:
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name == itemElementName)
{
XElement item = null;
try
{
item = XElement.ReadFrom(read...
Rameses asked 1/6, 2010 at 6:48
4
Solved
I'm getting this error when trying to parse through an XML document in a C# application:
"For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDt...
Doroteya asked 13/12, 2012 at 6:16
6
Is there a way to get the current position in the stream of the node under examination by the XmlReader?
I'd like to use the XmlReader to parse a document and save the position of certain elements...
1
I have created an XMLReader object out of a Stream object which I was written to earlier by XMLWriter object.
I know XMLReader object is forward only and therefore I want to be able to save curren...
Idiot asked 22/12, 2012 at 12:9
3
Solved
If the data is on a single line the
index=int.Parse(logDataReader.ReadElementContentAsString());
and
value=double.Parse(logDataReader.ReadElementContentAsString(),
cause the cursor to move forwar...
4
Solved
Please note this question is specific to XmlReader and not whether to use XDocument or XmlReader.
I have an XML fragment as:
private string GetXmlFragment()
{
return @"<bookstore>
<boo...
1
Solved
I'd like to parse one XML document using XMLReader. I have a case switch with all the Constants. However, if a Tag is self-closing XMLReader only fires ELEMENT, not ELEMENT and than END_ELEMENT lik...
1
Solved
I'm trying to query some very large XML files (up to several gig), check them for being well-formed, and write them to hard disk. Seems easy, but as they are so large I can not have a whole documen...
5
Solved
When I use XmlReader.ReadOuterXml(), elements are separated by \n instead of \r\n.
So, for example, if I have XmlDocument representatino of
<A>
<B>
</B>
</A>
I get
<A...
5
Solved
I've used the following code to create an XML file:
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
xmlWriterSettings.Indent = true;
xmlWriterSettings.NewLineOnAttributes = true;
us...
7
Solved
I'm trying to read the following Xml document as fast as I can and let additional classes manage the reading of each sub block.
<ApplicationPool>
<Accounts>
<Account>
<Name...
4
Solved
I've already written code to parse my xml file with an XmlReader so I don't want to rewrite it. I've now added encryption to the program. I have encrypt() and decrypt() functions which take an xml ...
Neurologist asked 1/10, 2012 at 15:37
5
Solved
I have some HTML that I'm converting to a Spanned using Html.fromHtml(...), and I have a custom tag that I'm using in it:
<customtag id="1234">
So I've implemented a TagHandler to handle t...
2
Solved
To load XML files with arbitrary encoding I have the following code:
Encoding encoding;
using (var reader = new XmlTextReader(filepath))
{
reader.MoveToContent();
encoding = reader.Encoding;
}
...
Filmdom asked 12/3, 2009 at 9:26
2
Solved
I'm working with ASP.NET, and am importing an XML file from a form. Right now I convert that into a Stream:
Stream inputStream = XmlFileUploadControl.PostedFile.InputStream;
because I may need ...
3
Solved
XElement.Save actually does what I need but it starts the file with:
<?xml version="1.0" encoding="utf-8"?>
Is there a way to prevent this?
Should I save using other types, methods after ...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.