Hi all, I have to import a xml file containing huge amount of data to be imported but before import I have to validate all data according to our system, if any tag has invalid value I have to show error message along with tag name and line number. for this I have used XmlDocument class of microsoft and validating each node through this class but I am unable to get line number of each node. Can anybody suggest me how to get line number of node being processed using XmlDocument class ? or is there any other way to show line number ? Thanks Rohit
Rohit16db
Posts
-
problem with xmldocument -
Problem in regular expressionConsider the following scenario I need to replace all above kind of string to hope this will make sense. Thanks Rohit
-
Problem in regular expressionHi all, I have stucked in regualar expression replace, please help me out My scenario is as follow I need to replace the "Anyvalue" with "SomeValue" in following string where "Anyvalue" can be different in different instance. Any suggestion would be highly appreciable. Thanks Rohit
-
Process large file in asp.netThanks dear but our problem is not related to loading of file but processing the file content which contains looping for data validation for each tags and number of tags could be more than lacs
-
Process large file in asp.netThanks dear for your kind suggestion. I will suggest to my client to do so but I would welcome the another approach for such case.
-
Process large file in asp.netHi all, I need yours openions in following scenario I have a web application where we allow to import data from xml file and the xml file could be larger like 10 to 20 MB containng more than 100000 record. For this thing we have increased the maxrequestlength upto 20MB as well as executiontimeout upto 1 hr. Can anybody confirm it is good to allow such processing via web application? if no then plese suggest me some alternative way to handle such case. Thanks Rohit
-
website got hackedThanks dear for your suggestion. I did all thing even I bought a new server even though same thing is happening there. One thing I would like to ask is it possible to delete all project related files from server via http injection as I found some suspecious request in IIS log file like /cgi-bin/env.pl, /fastenv etc. Hoping some answer from you
-
website got hackedDear all, I have a dedicated server where I used to publish the project developed in asp.net. Somebody deletes all source code from server. I cound not find any information of them either in IIS log or FTP log. Any body can help me please how I can detect who is doing this hell. I am very disappointed with such activity. Thanks Rohit
-
website got hackedDear all, I have a dedicated server where I used to publish the project developed in asp.net. Somebody deletes all source code from server. I cound not find any information of them either in IIS log or FTP log. Any body can help me please how I can detect who is doing this hell. I am very disappointed with such activity. Thanks Rohit
-
Need help in regex replace method.Thanks dear, you really did a great job for me. I will definately look into expresso.
-
Need help in regex replace method.Hi all, Can anybody provide me the regex to replace the '&' with '&' but the '&' character in word like '&','<' '>' etc shoud be ignored. Frankly speaking I am weak in regular expression. I would be highly thankful if somebody provide me the good learning articles on this. Thanks Rohit
-
My dedicated server got hackedDear all, I have a dedicated server window 2003 and it got hacked by someone. I could not understand how it happened. then I changed all password to access my server. Now On every two or three days my asp.net project's bin directory or other files got deleted I just could not understand how and who is playing this game with my server. I am very disappointed with such activity. Any help would be appreciated Thanks Rohit
-
Problem in server configurationwe have a dedicated server windows 2003 and all required software for asp.net project is installed. we have used .net 2008 provided Ajax which doesnot work there gives the javascript error "sys is undefined" but when I specified the machine key on web.config then its works. We got the error about the view state we had to made the enableledViewStateMAC to false in web.config. We got the session expire problem in "InProc" case which was solved when i used StateServer I just dont understand what wrong i did there.
-
Problem in server configurationHi All, I have hosted my asp.net 2.0 project in a general webserver where we have found a lot of problem like session expiry, view state, machine key etc. To execute my project on such server I had to do configuration which is required for asp.net project running on web farm. so I thought my server could be web farm. But the server guy has confirmed that they have not done any cofiguration for web farm and they say its a simple web server. I am totally confused if my server is not web farm then why its need configuration like web farm. why my code is not running there. Any body can suggest me whats wrong I am doing. Any help would be highly appriciable. Thanks Rohit
-
XPATH problemHi guys, I have a xml document as below and in Xslt I need to get the person name on the basis of email id as in below xml file , contributor node contain email id and associated name is included in Epic node can any body help me to get the name for each contributor through xpath? <ONIXMessage> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Epic> <Person> <Name>Rohit</Name> <Email>Rohit@gmail.com</Email> </Person> </Epic> </ONIXMessage>
-
XPATH problemHi guys, I have a xml document as below and in Xslt I need to get the person name on the basis of email id as in below xml file , contributor node contain email id and associated name is included in Epic node can any body help me to get the name for each contributor through xpath? <ONIXMessage> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Epic> <Person> <Name>Rohit</Name> <Email>Rohit@gmail.com</Email> </Person> </Epic> </ONIXMessage>
-
Validate XML with DTDHi guys, Hope you are doing well. I have a Onix complaint XML document that I want to validate it with some Onix complaint DTD. I did coding for same in C# XmlReaderSettings settings = null; try { string xmlPath = Server.MapPath("XML/nielsen_onix.XML"); //Load XML into XmlTextReader // reader = new XmlTextReader(xmlPath); //Load XmlTextReader into XmlValidatingReader settings = new XmlReaderSettings(); //Set the validation type settings.ValidationType = ValidationType.DTD; settings.ProhibitDtd = false; settings.CheckCharacters = false; //Hook up the XmlValidatingReader’s //ValidationEventHandler to a call //back method named ValidationCallBack settings.ValidationEventHandler += new ValidationEventHandler( this.ValidationCallBack); XmlReader reader = XmlReader.Create(xmlPath, settings); //Read through the XML document by calling //the Read() method while (reader.Read()) { } //Check boolean field named valid (located at top of code) if (valid) Response.Write("Validation is Successful!"); reader.Close(); } catch(Exception ex) { Response.Write(ex.Message); } This code runs good and show the xml file invaid while my xml file is valid when I validated it on http://www.w3schools.com/XML/xml\_validator.asp\[^\] Could you please check what's wrong going with me? Any help would be highly appreciable. Thanks Rohit
-
Validate xml against DTDHi guys, Hope you are doing well. I have a Onix complaint XML document that I want to validate it with some Onix complaint DTD. I did coding for same in C# XmlReaderSettings settings = null; try { string xmlPath = Server.MapPath("XML/nielsen_onix.XML"); //Load XML into XmlTextReader // reader = new XmlTextReader(xmlPath); //Load XmlTextReader into XmlValidatingReader settings = new XmlReaderSettings(); //Set the validation type settings.ValidationType = ValidationType.DTD; settings.ProhibitDtd = false; settings.CheckCharacters = false; //Hook up the XmlValidatingReader’s //ValidationEventHandler to a call //back method named ValidationCallBack settings.ValidationEventHandler += new ValidationEventHandler( this.ValidationCallBack); XmlReader reader = XmlReader.Create(xmlPath, settings); //Read through the XML document by calling //the Read() method while (reader.Read()) { } //Check boolean field named valid (located at top of code) if (valid) Response.Write("Validation is Successful!"); reader.Close(); } catch(Exception ex) { Response.Write(ex.Message); } This code runs good and show the xml file invaid while my xml file is valid when I validated it on http://www.w3schools.com/XML/xml_validator.asp[^] Could you please check what's wrong going with me? Any help would be highly appreciable. Thanks Rohit
-
Problem in uploading mp3 or large file.yes dear this is workig fine for small images but specially in mp3 file i am getting page cannot be displayed . I set the maxlength to 100000
-
Problem in uploading mp3 or large file.Hello dear, I am getting some problem in uploading mp3, video or large file through file server control in asp.net. I get Page cannot be displayed error. Although i changed web.conig file configuration. I have extended the execution time and max requestlength but nothing reflected. Can any body suggest me what's wrong I am doing ? Any help would be highly appreciated. Thanks Rohit