Home : Annotations : Manipulating : Is there an XML Schema for Atalasoft Annotations
Q10455 - FAQ: Is there an XML Schema for Atalasoft Annotations

From time to time, customers ask us for our "XML Schema" for our XMP/XML annotations.. the serialized annotation data saved out from our SDK

The short answer is that we do not provide one, and that furthermore, manual editing/ modification of serialized Atalasoft annotations is utterly unsupported.

The longer answer is as follows:
Our XML / XMP annotations which are saved out when exporting to XMP format is the direct result of serialization of our AnnotationData objects. Those objects can change without notice as they're internal to Atalasoft. We will not change our Public APIs without documentation/ notice and we work hard to ensure that our own components "round trip" read/write annotation data correctly... and that furthermore that our current components will properly understand older AnnotationData.

When a customer directly modifies our XMP or attempts to mimic our Annotation object creation/serialization making their own XML / XMP, we have no way of ensuring that it will properly round trip.. and worse yet, such manual creation/modification can introduce subtle errors/issues into the annotation data which could make for exceedingly difficult and time consuming troubleshooting/debugging and can consume huge amounts of Atalasoft support and engineering resources when customers report such bugs which are ultimately caused my manual modification of our XML

For those reasons, we can not and will not provide an XML Schema. Also, if we encounter an issue due to direct customer manipulation of our XML serialized annotations, the official reply is that such modification is utterly unsupported.

If you have a situation where you need to add custom data to annotations or are unsure of how to modify serialized annotation data in a way that is compliant with Atalasoft best practices, please feel free to create a support case

If you need to make alterations to annotations, please load your annotation data into an AnnotationController object and then use the AnnotationController and our normal Annotation API


string inFile = @"C:\somePath\to\input.xml";
string outFile = @"C:\somepath\to\output.xml";

using (FileStream inStream = File.OpenRead(inFile))
    // Create the controller and load annotation data to be modified

    AnnotationController ac = new AnnotationController();
new XmpFormatter());
    // lets say you wan to go through all annotations and set RectangleAnnotation objects to have a red fill
    foreach (LayerAnnotation la in ac.Layers)
        foreach (AnnotationUI anno in la.Items)
            if (anno.GetType() == typeof(RectangleAnnotation))
                RectangleAnnotation ra = anno as RectangleAnnotation;
                ra.Fill = new AnnotationBrush(Color.Red);

    //Once you're done changing things .. save it out
    ac.Save(outFile, new XmpFormatter());

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?


Tell us why you rated the content this way. (optional)
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2020. InstantASP Ltd. All Rights Reserved