Problem with XMLDocument class
-
I have an XML file which contains " " While using the Load or LoadXML function of XMLDocument class, " " is converted to "\r\n".I just want to retain as " " while loading the document.Is there a way to do that?
-
I have an XML file which contains " " While using the Load or LoadXML function of XMLDocument class, " " is converted to "\r\n".I just want to retain as " " while loading the document.Is there a way to do that?
The " " would probably have to be encoded as "
", I hope you can fix the process that creates the file.
-
The " " would probably have to be encoded as "
", I hope you can fix the process that creates the file.
I tried it but it doesn't work. if i have scrpit which has something like this This is tree. This is a palace. your solution gives me This is tree. This is a palace. When i use the msxml praser and parse the script i should get the same script before parsing. The output should This is tree. This is a palace. Can u suggest me some other solution. modified on Monday, February 23, 2009 7:10 AM
-
I tried it but it doesn't work. if i have scrpit which has something like this This is tree. This is a palace. your solution gives me This is tree. This is a palace. When i use the msxml praser and parse the script i should get the same script before parsing. The output should This is tree. This is a palace. Can u suggest me some other solution. modified on Monday, February 23, 2009 7:10 AM
I'm not sure what you're saying. What do you mean by "output"; isn't the output of the parser simply the contents of the XmlDocument? Perhaps you're still not explaining the problem clearly. Can you show some code?
-
I'm not sure what you're saying. What do you mean by "output"; isn't the output of the parser simply the contents of the XmlDocument? Perhaps you're still not explaining the problem clearly. Can you show some code?
Suppose i have xml file Test1(This is not created using dotnet parser) which contains the following. " This is a test for the new block. It should all be written on separate lines of text. Using import from the client sometimes will give you a double lined in new block. " Now i am importing this file using my GUI.My GUI uses C# XMLDocument to parse file(Test1) and imports it into new dir (say NewDir).When i open this file from the NewDir the contents are as shown bellow. " This is a test of the new block. It should all be written on separate lines of text. Using import from the client sometimes will give you a double lined in new block. " If u see the " " is missing at the end of the each line.This is causing the problem.When the text under the comment tag is shown in our control a new line is added between the lines. if the file contents of the file in NewDir is same as Test1.It is working fine. Is there a way to get the contents exactly same as in the contents of Test1 using the XMLDocument class. Please let me know if more clarification is required.