login about faq

Hi, dear sir,

we found the formatting of a empty-content element may be changed after LoadXml(), comapred with getXml(). "may" refer to some of them using a start-tag immediately followed by an end-tag has being converted to empty-element tag, and others may not. (version: 20101223_ChilkatVC8)

Q1. What is the logic for the conversion? Q2. Do we have any switch to disable the conversion?

thanks -- Stanley

asked Sep 11 '13 at 06:29

Simopro's gravatar image


XML is a standard such that the identical thing can be represented in a multitude of different ways. For example, "<abc></abc>" and "<abc />" both represent exactly the same thing. Also, whitespace is meaningless, and therefore the XML standard allows for XML documents to be beautified with indenting to make for easy readability. It should make no difference whether XML tags occur one after the other on a single line, or on separate lines nicely indented.

Any program that reads/writes XML should be capable of handling any given representation. It would be impossible for Chilkat to satisfy the special needs of all possible programs that have limitations because they are incapable of handling specific parts of the XML standard.

Chilkat XML is a DOM oriented parser -- meaning that when XML is parsed it is loaded into an internal document object model. When re-written, it is written from the DOM, and there may be whitespace, formatting, or other inconsequential changes. This is impossible to avoid.


answered Sep 13 '13 at 13:51

chilkat's gravatar image

chilkat ♦♦

Yes, you are right. and I totally agree with you.

I just wondering why some of them will be reformatted and others may not.

I am looking for a easy way for xml content comparison. just make sure a .net frameword-generated xml string from our third party partner cannot use string compare to expect that i can provide/return the same string after i load into ckxml.

thanks a lot




answered Sep 14 '13 at 04:10

Simopro's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 11 '13 at 06:29

Seen: 1,038 times

Last updated: Sep 14 '13 at 04:10

powered by OSQA