Mood:

Now Playing: 'The Pleasure is Yours, My Dear' Guy Crinkely Orchestra with this medley of 80's disco hits.
Topic: Microsoft and VCSY
This may be useful reference information for those of you trying to understand the process of getting information between a proprietary datastore and the XML world. Now, I can understand needing to demonstrate you're relevant in the XML and virtualization world but this does not do that. This demonstrates how much needs to be done to configure an interconnection. A very high level markup language such as MLE doesn't need all that complexity as all that lower level construction is done once and then virtualized everywhere as an arbitrary object/application/agent. If something better comes along, a SiteFlash system would replace the central example of the best service and the new usage and enhancement would be propagated throughout the system on the very next use. No can do that with the following techniques, but SOMEbody has to feed all those developers Microsoft cultured as a userbase rather than a freedom quotient for users. To Microsoft, the developer IS the user. You get what they make... when they can make it.
Writing Data in XML File Using dotNet
Process Data With in XML File By Arshad Raheed. Process Data With in XML File | Generic Windows, .NET Win32, VS, ASP.NET Dev Posted: 29 Aug 2006 Views: 5,688 | |
|
This Article Illustrate how to process data within XML File. For this Article I have developed a small Application that allows users to: · Read Data from XML file and display it in the ASP.NET DataGrid Control. · Write Data in XML File. · Updating Data in XML File. Getting Started There are 2 main files: 1. Products.xml 2. ItemXML.vb XML file (Products.xml) contains three elements Introduction
1. ItemID ‘ functioning as a primary key
(1. See code example at URL - dedacted for clarity)
2. ProductName
3. Price
ItemXML.vb contains all the business logic that I have used to process XML File I have used DataSet Object’s ReadXML method to Read data from XML file and then bind it to DataGrid control. (2. See code example at URL - dedacted for clarity) Variable ‘Path’ contains Server.MapPath(“/”) .. The Server.MapPath is not Accessible from the Class file, that is why I have sent it from the code behind file. (3. See code example at URL - dedacted for clarity) Insert function takes 3 parameters (ProductName, Price, Path). Item ID will be generated automatically by incrementing the last item ID in XML file by using the code: dr("ItemID") = CType(ds.Tables(0).Rows(ds.Tables(0).Rows.Count - 1)("ItemID"), Long) + 1 ds.Tables(0).Rows.Count -1 gives the last index value of the DataSet object For Writing to the XML File, I am using WriteXml method of the DataSet that takes the path of the file as a Parameter. Note: set permissions on the directory, if you do NOT want to make ALL files writeable, you could probably get away with setting the permissions on the Products.xml file itself. To achieve the updating process, I have used quite similar process as I have done in the Insertion. Here I am getting the Item ID from the QueryString and then compared it with all the ItemID’s from the XML file. If the ItemID exists, insert the new row at the same index value. ObjXMLData.Update(Request.QueryString("Product_ID"), Txt_ProductName.Text, Txt_Price.Text, Server.MapPath("/").ToString) (4. See code example at URL - dedacted for clarity) Reading Data from XML file and Binding it with DataGrid
Inserting Data in XML File
Updating Data in XML File
That’s all for this little topic. The code snippet used above is just to explain and is not complete. Download the complete source code from the zip file (download link is on the top). I am not used to of writing Articles infect this is first Article and u could have some problems understanding what I have done so far. For any kind of help contact me: arshadras@hotmail.com
About Arshad Raheed
End Article
Why is this a news item? Why does someone seem compelled to have to point out dotNet needs a whole lot of developer cobbling to get you from the dotNet data structure within the Microsoft proprietary application set out to the XML world in a enabled, virtualized, transacted, tracked, managed and governed fashion?
So each developer using Microsoft tools must build their own entrance and exit ramps from dotNet to the XML highway? In this day and age? And after $20bullion in research and development and all Oz has is an RSS hose and not an out-of-the-box node interconnection in sight. ????? I guess nobody finds that odd... that each developer would have to scrap around in the textbooks and find some way to get from proprietary dotNet to XML.
Oh, what am I saying? They have plenty of support! They have Raheed kicking ass with it here... 2007... six (6) years after Hailstorm... or hailstone as the case may be. Somebody must have got struck on the head with an icy baseball and they've been non-productive all these years.