Search the web
Sign In
New User? Sign Up
vsnetaddin · Visual Studio.NET Add-ins
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Regarding Addin   Message List  
Reply | Forward Message #3876 of 3878 |
Hi,

I want to make an addin which reads an XML code in the center Screen.
When the addin is clicked it should call an Validator Engine which
checks the XML code for errors.

This is my Execute statment:
Public Sub Exec(ByVal commandName As String, ByVal executeOption
As vsCommandExecOption, ByRef varIn As Object, ByRef varOut As Object,
ByRef handled As Boolean) Implements IDTCommandTarget.Exec
handled = False
If executeOption =
vsCommandExecOption.vsCommandExecOptionDoDefault Then
If commandName = "MyAddin1.Connect.MyAddin1" Then

Dim a As New Class1
a.tests()


handled = True
Exit Sub
End If
End If
End Sub


And the Class1 has a function called tests(). The class code is:

Imports EnvDTE
Imports EnvDTE80
Imports System.IO
Imports Extensibility
Imports System.Xml


Public Class Class1
Dim applicationObject As DTE2
Dim mydoc As XmlDocument





Public Sub tests()

'cmmd = applicationObject.Commands.Item("File.Open")

'i = cmmd.ID
'guid = cmmd.Guid
'name = cmmd.Name

Dim e As Int16 = 2

Dim fs As New FileStream("C:\Validation.xml", FileMode.Open,
FileAccess.Read)
Dim d As New StreamReader(fs)
d.BaseStream.Seek(0, SeekOrigin.Begin)
While d.Peek() > -1
MsgBox(d.ReadLine)
End While

End Sub


End Class


When I try to do the following

mydoc.Load("/abc.xml")
dim node as XMLNode

node= myDoc.DocumentElement

MsgBox(node.ToString)

It doesnt work... But when I use the StreamReader it works perfctly.
Can I Load an XML file using the Load method?

Please Advice..

Thanks




Thu Oct 16, 2008 7:53 pm

parasuraman....
Offline Offline
Send Email Send Email

Forward
Message #3876 of 3878 |
Expand Messages Author Sort by Date

Hi, I want to make an addin which reads an XML code in the center Screen. When the addin is clicked it should call an Validator Engine which checks the XML...
parasuraman.ramakrish...
parasuraman....
Offline Send Email
Oct 16, 2008
7:54 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help