This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Page tree
Skip to end of metadata
Go to start of metadata

CDATA Options

Since CDATA is just a syntactic notation in XML, and it's not part of XML info-set, by default XMLBeans is not saving additional state to remember which text is CDATA format. But numerous requests from users, convinced us that many do put semantics on CDATA, so we added two types of options to support CDATA format:

Fast CDATA

XmlOptions

This options control when saving will use CDATA blocks. CDATA will be used if the folowing condition is true:
textLength > cdataLengthThreshold && entityCount > cdataEntityCountThreshold

Defaults:

  • cdataLengthThreshold is 32.
  • cdataEntityCountThreshold is 5.

Fidelity CDATA

XmlOptions

If this option is used when loading a document, the store will be annotated with CDATA bookmarks.

If used for saving this option will save the text fields annotated with CDataBookmark as CDATA XML text.

Note: Due to the store representation, a CDATA will not be recognized if it is immediately after non CDATA text and all text following it will be considered CDATA.

Note: The two types of controlling CDATA output work independently.

  • No labels