Last post Apr 14, 2014 04:50 AM by Kevin Shen - MSFT
Apr 13, 2014 02:42 PM|tahazubairahmed|LINK
I need to know that if i would use XML file instead of Database in any Web application for selection and searching operations only
Than what is the opimize and best way so that we would used the data in our FrontEnd language (Asp.Net)
But i know this would be not a optimize way and Efficient way,
I need more methods for these operations.
Than finally selected any one which would be most optimized.
Apr 13, 2014 05:34 PM|AndyW2009|LINK
Wa alaykumu s-salam
On the database side of things I do not see why one would need to use XML as a data format, unless it is specifically required by the application or the data is stored natively in that format. I think it would be easier just to use LINQ/EntityFramework/ADO
to access the stored procedure and return a table object.
Whichever architecture you go with I dont think that is the real issue. My concern is that one is attempting to send 45Mb of data from a database server to a web application which will take a relatively long time. If end-users are invovled they will have
a potentially long wait for a response unless you have some kind of asynchronous method of giving a status or progress update. If it is possible, I might suggest considering implementing some kind of paging mechanism into your query and only pull a page
of data back at the time.
Apr 14, 2014 04:50 AM|Kevin Shen - MSFT|LINK
There are four ways of reading xml files.
The XmlDocument class is an editable in-memory representation of an XML document implementing W3C Document Object Model (DOM) Level 1 Core and Core DOM Level 2. Instances of the XmlDocument class are created using one of its three constructors. You can create
a new, empty XmlDocument object by calling the XmlDocument class constructor with no parameters. After calling the constructor, use the Load method to load XML data into the new XmlDocument object from a Stream, TextReader, or XmlReader object, as well as
the string path to an XML file.
The XPathDocument class provides a fast, read-only, in-memory representation of an XML document using the XPath data model. Instances of the XPathDocument class are created using one of its six constructors. These constructors allow you to read an XML document
using a Stream, TextReader, or XmlReader object, as well as the string path to an XML file.
XmlTextReader provides forward-only, read-only access to a stream of XML data. The current node refers to the node on which the reader is positioned. The reader is advanced using any of the read methods and properties reflect the value of the current node.
4 Linq to xml
LINQ to XML is an up-to-date, redesigned approach to programming with XML. It provides the in-memory document modification capabilities of the Document Object Model (DOM), and supports LINQ query expressions. Although these query expressions are syntactically
different from XPath, they provide similar functionality.
About Performance between the four ways above ,please refert to the link below:
About Linq to xml vs DOM ,please refer to link below:
About improving the xml performance,please refer to link below:
Hope it can help you.