XmlDocument doc = new XMLDocument();
XmlParseError x ;
XmlElement m;
XmlNodeList l;
int i;
XmlElement xmlRecord;
XmlNodeList xmlRecordList;
doc.loadXml("D:\Eclipse\BSRIntMexInvtAdjReqStagingService\BSRIntMexInvtAdjReqStaging.xml");
x = doc.parseError();
this code giving me error:
NAME:
x
VALUE:
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at DotNet.XmlDocument.LoadXml(XmlDocument* , Char* xml, Boolean trapError)
TYPE:
XmlParseError
Could anyone suggest me whats problem with this code/xml file?
*This post is locked for comments
I have the same question (0)