0
votes

I want to define an entity containing XML markup similar to the following in my XML document.

<testElm testAtt="attValue">Only a test.</testElm>

Is it possible to do this with an internal entity? Will I have to resort to an external entity? What is the best practice when declaring entities that contain XML markup?

1

1 Answers

0
votes

If the embedded XML doesn't need to be parsed by the XML parser, I would wrap it inside a CDATA section, which causes it to be ignored by the parser.

<![CDATA[<testElm testAtt="attValue">Only a test.</testElm>]]>