Trying to understand XML

Hi,

What is the point of displaying data from XML from a database and binding it with a control when you can just connect directly to the database and then display it using a control? A friend told me it's so that the data is dynamic. Well of course it can be dynamic without XML. So what's the deal with XML (particularily from a database)? What make so special?

I read that XML can be understood between different machines, like cash registers or whatever. Is this true?

Thanks

0
JustinEng
1/21/2007 11:11:52 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies
352 Views

Similar Articles

[PageSpeed] 1

Hi Justin,

The reason we use XML a LOT is that you cannot always connect directly to the db.  A lot fo the time we bind to other data sources such as a web service or an XML file.  XML is a common format that most systems can produce hence you can easily bind to a result set from pretty much any program as long as they can produce XML.  Systems such as cash registers and accounting programs and financial systems that all run on their own proprietary data formats can communicate with XML.

As an example you could write a web app that binds to a result set from a cash register and you dont need ti know anythign about that cash registers systems you only need to have the XML which in .Net you can just bind to straight away. 

Cheers HTH


Philip Beadle (MVP, MCAD, MCT DotNetNuke Core Team)
0
aus_nexxus
1/21/2007 11:17:39 PM

Thanks aus_nexxus!

What do you mean that you cannot always connect directly to the db? Anyway, do most people use XML for displaying the data from the db, even if they don't actually need it to communicate with different systems? Is it slower since it has to take the db's info, and then transform it to XML? (Unless you use an external local XML file)

Thanks!

0
JustinEng
1/22/2007 3:13:08 AM

What I mean is you dont always get given the database server connection string therefpre you can connect directly to it.  Quite often a service provider will only publish an XML feed or web service for you to access their data.

If you can access the db then use direct access.  Even when you can access the db you may want to produce XML (SQL 2005 can do this directly from the DB with the FOR XML command) depending on your requirements. 

Cheers


Philip Beadle (MVP, MCAD, MCT DotNetNuke Core Team)
0
aus_nexxus
1/22/2007 3:23:06 AM
The Main purpose of XML is interportability. Suppose how a Java and .NET application can communicate, They cannot understand each other language/variable/objcts. But both of them can understand XML if One can pass an XML the other can easily pick it and the vice versa. 

Sure you do not have to take XML as consideration if you do not need any communication with an align system, you can surly drop it from your mind. Regarding Performace, Yes there is some overhead generating the xml from db but that complety depends upon the size of the data.
Long Live .NET
Kazi Manzur Rashid (Amit)
_________________________
Web: http //dotnetshoutout.com
Blog: http://weblogs.asp.net/rashid
Twitter: http://twitter.com/manzurrashid
0
KaziManzurRashid
1/22/2007 3:36:18 AM
Reply:

Similar Artilces:

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null. (67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems"); ((webcontrols.BrowseItems)UserControl).pnl_browse_main.Controls.Add(ut); This is how we Load User controls into a content place holder. try { UserCont...

Microsoft Chart control for .NET Framework about state management and serialization problem, it works OK with one XML file but fails with another XML file
I use Microsoft Chart control for .NET Framework , you can see details at http://blogs.msdn.com/alexgor/archive/2008/10/27/microsoft-chart-control-for-net-framework-released.aspx The Chart1 is load data from a xml and save to ViewStateData, so even if after I click Reload button, the chart1 still display OK! I'm very strange that the chart1 works well after click Reload button if it's loaded from Chart1.Serializer.Load(HttpContext.Current.Server.MapPath("~/Template/1.xml"));but chart1 don't display fter click Reload button if it's loaded from Chart1.Serializer.Loa...

Trying to Understand the Info, Controller Object
All,I spent some time going over the training videos here. http://www.dotnetnuke.com/About/TrainingVideos/tabid/810/Default.aspx NICE!!!I am familiar with asp.net etc. Using the codesmith to build the code for the Info and Controller objects is nice. However, how do I set up my code in the Info Class to represent something like a Student that is in MANY art classes? Do I append a Dataset to that Class Object containing those relationships and modify the Controller Class to load that data? I want to do things the DNN way so please help!Thanks Anyone yet?...

Dynamic Controls: Trying to understand the logical flow?
I've been reading countless articles describing how to create dynamic server controls, then assign values to them.  I'm having difficulty assigning values as I keep getting an "Object reference not set to an instance of an object" error.  I am unable to paste my exact code, but here is basically what I'm trying to accomplish: I have a house with 1 to many windows and the user can add windows as they see fit.  I'm dynamically creating a table to hold the windows, and ultimately want to recreate/populate the table when the user needs to update the number of windows.House.aspx:Co...

Trying to understand postback with dynamic created controls
Hello,  I have real difficulty trying to understand how to handle postbacks with controls that are dynamically created. I have a webform in which I create a number of checkboxes dynamically (fillRoles). When I click the save button on my form I execute the btnSave_Click eventhandler that should save my checkbox values into the database. But since the checkboxes are lost at the postback i re-create them, figuring they should regain their state because i create them with the same ID. I guess I've made some amateur designer booboos here. Could somebody please assist? Here is my code: &nb...

presenting XML/XSLT data within a Web control
How do I redirect Code generated by XSL transform of an XML document to a Web control? The Response.Write writes it to the entire screen , not a particular web controlA man's gift maketh room for him, and bringeth him before great men. -- Proverbs 18:16 Use the asp:Xml control.Kirk Allen Evans [MSFT]...

Still Trying to Understand Perl Module Control Process
I am using cpanp or cpan plus to handle perl modules on a FreeBSD system. If I give the command cpanp -i Net::DNS it installs Net::DNS 0.73. Normally, this is exactly what one would want it to do but Net::DNS0.73 is buggy. At least one bug causes domain name server or DNS updates to fail so I either want the version just below Net:DNS0.73 or there are a couple of versions of it dated January of 2014, basically anything but the one it keeps trying to install. What am I supposed to do to safely fix this problem and hopefully keep the rest of perl working and cause the installati...

How do the different data presentation controls equate in ADO.net?
How does Visual Studio create ado.net equivalents of the datagrid's and gridview's columns and rows?  I am assuming they make a DataRow for each of the rows.  Am I on the right track with this?Is the table created by gridview basically a dataset from ADO.net?  Can anyone offer any guidance with this?Thanks to everyone that has ever helped me with any posts. Hi newbie2C#, The row in datagrid is called DataGridItem and in gridview is called GridViewRow. They are all inherits TableRow Class. DataRow is only one kind of row in GridView control. There are many other t...

Trying to use XML to act as a database -> ADO.NET?
Hi,I'm trying to find a solution to store some data get from a temporary queue and save it somewhere so that users can get access to it next time when they go into the webpage.Then I've found out something about XML which can act as a database.  I've seen some articles about how it is possible by using ADO which allows to even "query" the XML similar to database way.But I dont know how it is possible and whether it's the solution I'm trying to look for. And, if it really is, any configuration involved? files I need to put in as reference? how do I start from coding? any g...

System.Net.Sockets.SocketException when trying to use xml feed
Hi folks, strange error I'm getting here, I'm trying to connect to the ECB s currency exchange feed which is located at http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml - it looks nice and simple to use.  However my code is throwing a socket exception when I run it from the server and a system.net.webexception - {"The remote server returned an error: (407) Proxy Authentication Required."} when I run it from within visual studio. I had a sample script which took feeds from the BBC site on my home computer which worked fine but it does not work from m...

Trying to start with the control toolkit in VWD 2008 express and net 3.5
Has anyone else had any problems with this? I can't use the toolkit (can't drag and droop items from it onto design view), VWS08 isn't 'extender aware' as descibed on Joe Stagner's video on 'ASP.NET AJAX Support in Visual Studio 2008' (http://www.asp.net/learn/3.5-videos/video-224.aspx). The new AJAX support sounds great, but isn't much use to me if VWD 08 can't do what the full version can. Cheers    I've added ajxcontrolttoolkit controls to the toolbox this way:- Create a new group in the toolbox- Drag and drop the ajax...

Trouble controlling .net controlls with CSS
 I am trying to control the :hover css property on <asp: Button> controls. Basically the css is working correctly to set the initial look of the button, but nothing is happening when I hover over the button. Here is my code:CSS:.sidebarButton{    width: 168px;     height: 45px;     background-color: #666666;     text-align: left;    font-weight: bold;    font-family: Century Gothic;    font-size: 13pt;    color: White;    border-style: none;  ...

Reading XML when no XML present for xmlnode...
Hello: I load an xml document to read, the documents vary in form and shape from each xml file to the next. I run the following: rootnode2.SelectSingleNode("//dt_array/item[@key='2']/dt_assoc/item[@key='name']") It returns the 'name' When I run the same statement but change the key='3' it throws an error since in the xml document there is not key='3'. But some documents will include the key='3' and some will not, how do I work around this? I tried the following which failed to work... If rootnode2.SelectSingleNode("//dt_array/item[@key='3']/dt_assoc/item...

Web resources about - Trying to understand XML - asp.net.presentation-controls

Resonate Social For Facebook Helps Advertisers Understand Users’ Motivations
Why do Facebook users make the decisions they make? Resonate wants to help advertisers find out, so the digital marketing outfit launched Resonate ...

Facebook PMD Gigya releases Consumer Insights to better understand user identities
... allows marketers to easily query Gigya’s Identity Storage database and tie identity information with key performance indicators to understand ...

Genius — Search and understand the meaning of song lyrics, poetry, literature, and news on the App Store ...
Get Genius — Search and understand the meaning of song lyrics, poetry, literature, and news on the App Store. See screenshots and ratings, and ...

All sizes - Most people do not listen with the intent to understand; they listen with the intent to reply ...
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

"Understands" - YouTube
If Mitt Romney wins, the middle class loses. (Priorities USA Action is responsible for the content of this advertising)

Scientists continue search to understand Mers
The Mers coronavirus continues to confound scientists. To better understand the disease and determine where it comes from, a new project set ...

Explainer Video of the Day: Author John Green Helps You Understand Boko Haram
... in the news, but the situation in Nigeria with the Islamist terrorist group Boko Haram often gets overlooked and can be difficult to understand. ...



Businesses don't understand FTAs, so how will they deal with the TPP?
The government is keen to negotiate free trade agreements to bolster economic activity, but new research shows it has its work cut out to educate ...

Resources last updated: 12/11/2015 7:12:01 PM