Closed GoogleCodeExporter closed 8 years ago
If you check the complete error message, it reads "Entry must contain at least
one category".
There are many ways to specify the category, you may probably want to add a
line like the following before you call Insert:
entry.Categories.Add(DocumentEntry.DOCUMENT_CATEGORY);
Original comment by ccherub...@google.com
on 13 Jul 2011 at 12:04
Thank you very mutch. The upload works now with:
AtomEntry entry = new AtomEntry();
AtomPerson author = new AtomPerson(AtomPersonType.Author);
author.Name = "Moritz";
author.Email = "moritz.goeckel@gmx.de";
entry.Authors.Add(author);
entry.Title.Text = "Tennis with Beth";
entry.Content.Content = "Meet for a quick lesson.";
entry.Categories.Add(DocumentEntry.DOCUMENT_CATEGORY);
docService.Insert(feed, entry);
But the content does not apear online an googleDocs.
What is wrong?
Does anyone know?
By the update apears this error. I dont understnand. Is it wrong to put
text in the Content?
"[Line 29, Column 15, element content] This element must not have any
text() data"
<errors
xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>Pars
eException</code><internalReason>[Line
29, Column 15, element content] This element must not have any text()
data</internalReason></error><error><domain>GData</domain><code>textNotAllowed</
code><internalReason>This
element must not have any text() data</internalReason></error></errors>
Original comment by moritz.g...@gmail.com
on 15 Jul 2011 at 6:49
You can't access the content of the documents using the API.
What you can do is creating a text file and uploading it using
docService.UploadDocument().
Original comment by ccherub...@google.com
on 15 Jul 2011 at 9:49
Ah okay...
Thank you very mutch!
Original comment by moritz.g...@gmail.com
on 15 Jul 2011 at 11:40
Original issue reported on code.google.com by
moritz.g...@gmail.com
on 10 Jul 2011 at 11:25