Re: Error: Name cannot begin with the '0' character, hexadecimal value
- From: "Henning Krause [MVP - Exchange]" <newsgroups_remove@xxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Oct 2007 07:42:55 +0200
Hello,
that error is a standard XML error message - Exchange requires you to sent invalid xml to the server.
You can work around this by escaping the 0 in the front. See http://www.infinitec.de/articles/exchange/creatingwebdavrequestswithxmlreaderwriter.aspx.
If I recall it correctly, a:0x must be written <h:0x8102/> must be written as <h:_x0030_x8102>
Kind regards,
Henning
"Atul Saxena" <AtulSaxena@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:D17E96F0-BC10-499D-830F-30D85996FDFF@xxxxxxxxxxxxxxxx
Dear All,
I am working exchange server & fetching task of outlook 2007
through MSXML2.XMLHTTP30 now I am facing the following error
"Name cannot begin with the '0' character, hexadecimal value
0x30. Line 1, position 564" while reading XML. Please help me to
solve this problem. I am also mentioning the code below:
Private Function ReadTask(ByVal stURI As System.String)
Dim sQuery As String
Dim status As Integer
Try
' Open the item.
oXMLHttp.open("PROPFIND", stURI, False, Me.UserNameAlias, Me.Password)
' Set up the query to get subject, from, and to.
sQuery = "<?xml version='1.0' encoding = 'utf-8'?>" & _
"<a:propfind xmlns:a='DAV:'
xmlns:m='urn:schemas:mailheader:' " & _
"xmlns:b='urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/' " & _
"xmlns:g='urn:schemas:httpmail:' " & _
"xmlns:i='http://schemas.microsoft.com/mapi/id/" & _
"{00062008-0000-0000-C000-000000000046}/' " & _
"xmlns:h='http://schemas.microsoft.com/mapi/id/" & _
"{00062003-0000-0000-C000-000000000046}/'> " & _
"<a:prop>" & _
"<m:subject/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<a:id/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<g:textdescription/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<h:0x00008102/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<h:0x00008104/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<h:0x00008101/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<i:0x8516/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<a:getlastmodified/>" & _
"</a:prop>" & _
"<a:prop>" & _
"<i:0x8517/>" & _
"</a:prop>" & _
"</a:propfind>"
' Set up request headers.
oXMLHttp.setRequestHeader("Content-Type", "text/xml")
' oXMLHttp.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp.send(sQuery)
status = CheckStatus(oXMLHttp.status)
If status = En.enStatus.Multi_Status Then
Call ParseTaskXML(oXMLHttp.responseText)
End If
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try
End Function
Private Function ParseTaskXML(ByVal responseText As
System.String)
Dim reader As New XmlNodeReader(xmlDoc)
Try
xmlDoc.LoadXml(responseText)
While reader.Read()
If reader.Name.ToLower() = "d:subject" Then
strSubject = reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "e:textdescription"
Then
Me.strDescription = reader.ReadInnerXml
End If
If reader.Name.ToLower() = "f:0x00008102" Then
Me.dbTasksCompletedPercent reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "g:0x8516" Then
Me.dtTasksStartDate = reader.ReadInnerXml
End If
If reader.Name.ToLower() = "g:0x8517" Then
Me.dtTasksDueDate = reader.ReadInnerXml()
End If
If reader.Name.ToLower() = "f:0x00008101" Then
' reader.ReadInnerXml
End If
End While
Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
reader = Nothing
End Try
End Function
.
- Follow-Ups:
- Re: Error: Name cannot begin with the '0' character, hexadecimal v
- From: Atul Saxena
- Re: Error: Name cannot begin with the '0' character, hexadecimal v
- References:
- Error: Name cannot begin with the '0' character, hexadecimal value
- From: Atul Saxena
- Error: Name cannot begin with the '0' character, hexadecimal value
- Prev by Date: Error: Name cannot begin with the '0' character, hexadecimal value
- Next by Date: Re: Showing Error: HTTP/1.1 403 (Forbidden)
- Previous by thread: Error: Name cannot begin with the '0' character, hexadecimal value
- Next by thread: Re: Error: Name cannot begin with the '0' character, hexadecimal v
- Index(es):
Relevant Pages
|