Error :XML not defined

A

Aaron

I am trying to imput data in too a xml file. How can it deal with the issues below

I try putting in System.XML to see but it give me a error about only having one inherits per class.



Partial Class _xxxx

Inherits Web.UI.Page

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click



Dim xDoc As New XmlDocument

Dim newComment As XmlDocumentFragment = xDoc.CreateDocumentFragment()







Dim root As XmlElement = xDoc.DocumentElement



End Class

These 3 bolded items are the errors.
Error 1 Type 'XmlDocument' is not defined.
Error 2 Type 'XmlDocumentFragment' is not defined.
Error 3 Type 'XmlElement' is not defined.

TIA
 
O

Oleg Tkachenko [MVP]

Import System.Xml namespace in your class or use fully qualified name -
System.Xml.XmlDocument.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top