Jon,
The stack trace indicate that the problem is in the first line of the method
below, but the problem could be outside. Anyway all the methods calls in
this method are safe.
private void serializeProperty(PropertyInfo pr)
{
writer.WriteStartElement("UML:Attribute");
writer.WriteAttributeString("xmi.id",IdsGen.genera tePropertyId(pr).ToString(
));
writer.WriteAttributeString("name",pr.Name);
writer.WriteAttributeString("visibility","public") ;
writer.WriteAttributeString("isSpecification","fal se");
writer.WriteAttributeString("ownerScope","instance ");
//streotype of property accessiblility
if ((pr.CanRead)&&(pr.CanWrite)) serializeRefToStereotype("ReadWrite");
else
i f (pr.CanRead) serializeRefToStereotype("Read");
else serializeRefToStereotype("Write");
//property type
writer.WriteStartElement("UML:StructuralFeature.ty pe");
writeTypeIDREF(pr.PropertyType);//id reference
writer.WriteEndElement();
writer.WriteEndElement();
}
Thanks !
"Jon Skeet [C# MVP]" <sk***@pobox.com> a écrit dans le message de
news:MP************************@msnews.microsoft.c om...
Abdessamad Belangour <be*******@irin.univ-nantes.fr> wrote: I have developped an application that generate XML documents.
At most time it works fine, but sometimes (when the size of data to
export is big) i got the error message :
<< The StartElement token in the Epilog state will generate a nonvalid
XML document :
at System.XML.XMLTextWriter.AutoComplete(Token token)
at System.XML.XMLTextWriter.WriteStartElement(String prefix, String
localName,String ns)
at System.XML.XMLTextWriter.WriteStartElement(String prefix, String
localName,String ns) at.....etc.>>
I have reviewed well formedness of my XML instructions but i have found
no error in them.
Please, give me any idea to track and solve the problem.
The stack trace should show where in your code it's complaining -
please post that section of code, and what the data is like at the
time.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too