Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds support for xml based serialization and deserialization #15

Closed
wants to merge 0 commits into from

Conversation

emazv72
Copy link

@emazv72 emazv72 commented Nov 20, 2018

This PR basically adds support for an alternative - xml based - format for serialization and deserialization.

The package MigraDoc.DocumentObjectModel.IO.Xml has been added for parsing.
In order to support serialization, a new XMLSerializer has also been added.

Some sample code follows:

#if DEBUG

		MigraDoc.DocumentObjectModel.IO.Xml.DdlWriter.WriteToFile(document, "MigraDoc.xml");

		using (StreamReader sr = File.OpenText("MigraDoc.xml"))
		{
			var errors = new MigraDoc.DocumentObjectModel.IO.DdlReaderErrors();
			var reader = new MigraDoc.DocumentObjectModel.IO.Xml.DdlReader(sr, errors);

			document = reader.ReadDocument();

			using (StreamWriter sw = new StreamWriter("MigraDoc.xml.errors"))
			{
				foreach (MigraDoc.DocumentObjectModel.IO.DdlReaderError error in errors)
				{
					sw.WriteLine("{0}:{1} {2} {3}", error.SourceLine, error.SourceColumn, error.ErrorLevel, error.ErrorMessage);

				}

			}

		}

#endif

emazv72 added a commit to emazv72/MigraDoc that referenced this pull request Aug 26, 2020
# This is the 1st commit message:
Introduce xml format for serialization and deserialzion

# This is the commit message empira#2:

Update README.md
# This is the commit message empira#3:

Comment fix for release build

# This is the commit message empira#4:

xml parser fix

# This is the commit message empira#5:

last page header and footer

# This is the commit message empira#6:

footer fix

# This is the commit message empira#7:

upgrade README.md

# This is the commit message empira#8:

Update README.md
# This is the commit message empira#9:

last page header footer rendering fix

# This is the commit message empira#10:

ListInfo fix serialization

# This is the commit message empira#11:

paragraph parsing fix

# This is the commit message empira#12:

text parser fix

# This is the commit message empira#13:

support para break

# This is the commit message empira#14:

CDATA parser fix

# This is the commit message empira#15:

rounded corner radius for table cells

# This is the commit message empira#16:

makes DifferentLastPageHeaderFooter  section aware

# This is the commit message empira#17:

fix cell serialization

# This is the commit message empira#18:

Avoid rendering failure images

# This is the commit message empira#19:

barcode rendering

# This is the commit message empira#20:

doc fix

# This is the commit message empira#21:

support barcode elements inside a paragraph

# This is the commit message empira#22:

barcode rendering fix

# This is the commit message empira#23:

amend README.md

# This is the commit message empira#24:

fix readme

# This is the commit message empira#25:

fix readme
@emazv72 emazv72 closed this Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant