Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

XML Parse Error

i test my application on IP Phone 7970

i get an "XML Parse Error 4" what does it mean?

i develop my application by ASP.NET(C#)

8 REPLIES
New Member

Re: XML Parse Error

It means what you sent to the phone is not valid XML.

New Member

Re: XML Parse Error

-

Please Select Service

Main Menu

-

Student Service

http://localhost/Login/Default.aspx

-

Phone Directory

http://localhost/StudentServiceMenu/Default.aspx

it's good on Phone Services Emulator but error on the phone

New Member

Re: XML Parse Error

XML is case-sensitive.

Url != URL tags.

Re: XML Parse Error

also, remove the 1st line

you probably need it for the emulator tho

New Member

Re: XML Parse Error

Thank you so much for all reply.

i changed Url to URL tag but it's still error.

How i delete the 1st line?

i use "System.Xml.XmlTextWriter" for write XML tag.

It always have in the first line.

anyone have a good idea for make it disappear.

Sorry for my terrible English.

New Member

Re: XML Parse Error

Yes... you have to

1) create a subclass of XmlTextWriter

2) in that subclass, override the methods WriteStartDocument and WriteStartDocument(bool) to do nothing (the StartDocument method is what generates the XML header).

Example:

///

/// A simple wrapper around XmlTextWriter to not write the xml declaration

///

public class XmlDeclarationRemover : XmlTextWriter

{

public XmlDeclarationRemover(Stream stream, System.Text.Encoding encoding) :

base (stream, encoding) { }

///

/// Do not write XML declaration

///

public override void WriteStartDocument() { }

///

/// Do not write XML declaration

///

public override void WriteStartDocument(bool standalone) { }

}

Re: XML Parse Error

and what set for the content type?

it should be text/xml

New Member

Re: XML Parse Error

Thank you so much.

420
Views
0
Helpful
8
Replies