473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Wrong XML Format

After serialization XMLNode recieved consist of \" signs instead of ". So it
can not be parsed and processed. How to get rid of it?

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #1
5 1355
please provide an example of what was produced, what was expected, and the
code that produced it.
--- Nick

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:u0**************@TK2MSFTNGP10.phx.gbl...
After serialization XMLNode recieved consist of \" signs instead of ". So it can not be parsed and processed. How to get rid of it?

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #2
Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the quotes were serialized to \" in
your application. If there is any misunderstanding, please feel free to let
me know.

As far as I know, quote will not be coverted to \" in the serialization.
Could you try to open the xml file after serialization in Notepad and check
it again? If the problem still persists, could you provide us an example as
Nick mentioned, so that we can deliver our assistance more quickly?

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
I think that I know what is a problem, however following the method wich
called it

SomeClass.Serializer ser = new SomeClass.Serializer();

System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.AppendChild(doc.ImportNode(SomeOtherClass.GetO bjectsData(),true)); //
return serialized XML Node

return ser.DeSerialize(doc); //make deserialization

-------------------------

Strange thing,

doc.InnerXML == doc.OuterXml.

The XML was previously serialized and saved:

Here is the beginning of this XML

doc.OuterXml "<TESTData xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"Some
Processes\"><ProcessCollection Name=\"Process
1\"><ObjectState>Null</ObjectState><Names
Name=\"Boba\"><ObjectState>Null</ObjectState><SIG><p1>10</p1><p2>169</p2><p3
2</p3><p4>1</p4></SIG><Position><PinX>0</PinX><PinY>0</PinY></Position></Na mes>" string

etc...etc As you can see all " are covered by \

What to do. Desiarilization failed on

There is an error in XML document (1, 2). --->

System.InvalidOperationException:

<TESTData xmlns='TestNameSpace'> was not expected.

Why it need it???

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:7Q****************@cpmsftngxa06.phx.gbl... Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the quotes were serialized to \" in
your application. If there is any misunderstanding, please feel free to let me know.

As far as I know, quote will not be coverted to \" in the serialization.
Could you try to open the xml file after serialization in Notepad and check it again? If the problem still persists, could you provide us an example as Nick mentioned, so that we can deliver our assistance more quickly?

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #4
Hi Tamir,

Could you let me know, where did you check the content of doc.OuterXml? Did
you check it in the watch window? If so, the " were not converted at all,
the \ was added only for display. If you put the OuterXml into a TextBox
for display, you will not see the \.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #5
You are right. The REAL problem described at my post with title : "
De/Serialization problem

" at 05-Jul-04

Please assist with it, if you can

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:sh***************@cpmsftngxa06.phx.gbl...
Hi Tamir,

Could you let me know, where did you check the content of doc.OuterXml? Did you check it in the watch window? If so, the " were not converted at all,
the \ was added only for display. If you put the OuterXml into a TextBox
for display, you will not see the \.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gargamel | last post by:
Hiya. I've taken over the development of a web app written in ASP. It's not very well coded. In the live environment it's fine, but on my local machine it falls over whenever it tries to pass...
10
by: bjaj | last post by:
Hi I have made this msgbox to display the current Week number, but it shows the wrong weekno. Can anyone tell me why ? msg = "WeekNumber: " & DatePart("WW", Date) MsgBox msg It shows...
2
by: Aliasgar Pocketwala | last post by:
Hi, I have an asp.net application that is using the wrong culture. I cant figure out where does it get its setting from. My web application runs as a specific user since so that I can give it...
0
by: GFro | last post by:
I have a calendar page that returns a date to a textbox on the parent page. It is returning the wrong format on the deployment server. On the development server the calendar returns to textbox in...
7
by: Gucci | last post by:
<?php /** * check ine year is a leap year, and return the month day array * * @param int $year **the year must bigger than zero** * @return array */ function is_leap_year($year){...
15
by: robert maas, see http://tinyurl.com/uh3t | last post by:
Here's the source: #include <stdio.h> #include <errno.h> main () { char* str = "9999999999"; long long int llin; char* endptr; /* Set by strtoll */ int nch; errno = 0; llin = strtoll(str,...
30
by: Bill Reid | last post by:
#define MAX_VALUES 64 typedef struct { unsigned value_1; double value_2; double value_3; double value_4; } VALUES; typedef struct {
2
by: GS | last post by:
somewhere towards end of the form calls I have private void setRegexoptionsChkBoxOnPosnChgd(object sender, ConvertEventArgs cevent) { if ((cevent.Value == DBNull.Value)) { cevent.Value = "";...
7
by: Peter | last post by:
I have the following code in DonNetNuke application, I am trying to create a popup in every DataList Item, eveything is working with exception the popups do not line up with every DataItem. How do...
10
by: questions | last post by:
# include <stdio.h> # include <math.h> int main() { long int x,y; printf("enter an integer\n"); scanf("%d",&x); y=x%pow(10,3);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.