/ Published in: VB.NET
                    
                                        
Create a new xml file and display it in browser
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
Dim products As New XDocument(New XDeclaration("1.0", "utf-8", ""), _
New XElement("products", _
New XElement("product", _
New XAttribute("id", "p1"), _
New XElement("name", "Alpha"), _
New XElement("price", "1200"), _
New XElement("stock", "19"), _
New XElement("country", "Germany"))))
products.Save(Server.MapPath("products-linq.xml"))
Response.Redirect("products-linq.xml")
'load file in browser
Comments
 Subscribe to comments
                    Subscribe to comments
                
                