Hi Pranav Not exactly sure what you're trying to do here. When you assign xmlr in the first line, you are creating a new XmlTextReader passing the variable ms as a constructor. What is ms? A memory stream containing the XML data to be read? I suspect the error you are receiving is related to reading the XML data rather than writing nodes to the XmlWriter XMLWR. There is no need to access the internet to write XML data. If you want the writer to include a namespace, you can obviously specify one yourself but if you don't, I can't see MS requiring that the computer running such code must be connected to the internet. I'd suggest looking at where xmlr is reading from rather than the XMLWR. Cheers Ian -----Original Message----- From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Pranav Lal Sent: 14 May 2011 18:10 To: program-l@xxxxxxxxxxxxx Subject: [program-l] Visual Basic .net: getting XMLWriter not to access the Internet Hi all, I have the following code in my application xmlr = New XmlTextReader(ms) xmlr.WhitespaceHandling = WhitespaceHandling.None XMLWR.Formatting = Formatting.Indented While xmlr.Read XMLWR.WriteNode(xmlr, False) End While Try xmlr.Close() XMLWR.Flush() XMLWR.Close() Catch lx As Exception MsgBox("Error in writing temporary xml. Quitting") My.Application.Log.WriteException(lx) quit() End Try XMLWR = Nothing xmlr = Nothing When the code reaches the line XMLWR.WriteNode(xmlr, False) it accesses the Internet to lookup the XML schemas I presume. I do not want the code to access the Internet since my user should be able to run the application offline. What do I do? Pranav ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq ** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq