Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Including xml in a pre tag(Including xml in a pre tag)
Including xml in a pre tag [message #525781] Wed, 07 April 2010 19:00 Go to next message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Hi,

I see that other help pages include xml in a pre tag like this:

<pre xml:space="preserve">  

	<ecore:EPackage 
		xmi:version="2.0" 
		xmlns:xmi="http://www.omg.org/XMI"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
		xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
		name="library" 
		nsURI="http:///library.ecore" 
		nsPrefix="library">
		<eClassifiers 
			xsi:type="ecore:EClass" 
			name="Book">
			<eStructuralFeatures 
				xsi:type="ecore:EAttribute"
				name="title"
				eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
			<eStructuralFeatures 
				xsi:type="ecore:EAttribute"
				name="pages" 
				eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
		</eClassifiers>
	</ecore:EPackage>  
</pre>


However when I do this, it does not render visibly. Any ideas?

TIA,
- Ole
Re: Including xml in a pre tag [message #525788 is a reply to message #525781] Wed, 07 April 2010 19:31 Go to previous message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
OK - Never mind - I looked at the source for the help document and turns most of the characters need escaping like this:

<pre>
&lt;ecore:EPackage xmi:version=&quot;2.0&quot; xmlns:xmi=&quot;http://www.omg.org/XMI&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:ecore=&quot;http://www.eclipse.org/emf/2002/Ecore&quot;
name=&quot;library &quot;nsURI=&quot;http:///library.ecore&quot; nsPrefix=&quot;library&quot;&gt;
&lt;eClassifiers xsi:type=&quot;ecore:EClass&quot; name=&quot;Book&quot;&gt;
&lt;eStructuralFeatures xsi:type=&quot;ecore:EAttribute&quot; name=&quot;title&quot;
eType=&quot;ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString&quot;/&gt;
&lt;eStructuralFeatures xsi:type=&quot;ecore:EAttribute&quot; name=&quot;pages&quot;
eType=&quot;ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt&quot;/&gt;
&lt;/eClassifiers&gt;
&lt;/ecore:EPackage&gt;</pre>
Previous Topic:Turn filtering on/off in the Infocenter
Next Topic:Including xml in a pre tag
Goto Forum:
  


Current Time: Thu Nov 27 21:12:51 GMT 2014

Powered by FUDForum. Page generated in 0.02489 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software