TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hema latha
NA
122
31.4k
read xml with check DTD valid or invalid using vb.net
Jan 22 2019 4:29 AM
Unexpected end of file while parsing comment has occurred.line 57,position 69,when read xml file.why did come this error?How to resolve this error?
Imports System.Xml
Imports System.Xml.Schema
Module Module1
Private isValid As Boolean = True
Sub Main()
Dim XMLPath As String = "D:\Karpagam\files1\xmlfiles\
04-CHAPTER-4.xml"
' Set the validation settings.
Dim settings As XmlReaderSettings = New XmlReaderSettings()
settings.DtdProcessing = DtdProcessing.Parse
settings.ValidationType = ValidationType.DTD
settings.ValidationFlags = XmlSchemaValidationFlags.
ReportValidationWarnings
settings.ValidationFlags = XmlSchemaValidationFlags.
ProcessInlineSchema
AddHandler settings.
ValidationEventHandler, AddressOf ValidationCallBack
' Create the XmlReader object.
Dim reader As XmlReader = XmlReader.Create(XMLPath, settings)
' Parse the file.
While reader.Read()
End While
Private Sub ValidationCallBack(sender As Object, e As ValidationEventArgs)
MsgBox(String.Format("
Validation Error: {0}", e.Message), MsgBoxStyle.OkOnly)
End Sub
End Module
Reply
Answers (
1
)
Class not registered (exception from hresult: 0x80040154 Err
what is entity frame work?