Solved

Retrieve HTML from XML doc

Posted on 2004-03-27
3
178 Views
Last Modified: 2010-04-06
I hope this easy. I wrote a php code that save HTML tags inside XML file as below:

<DOC>
  <TITLE ID="96001">test</TITLE>
  <PAR ID="96002”>
<!—HTML tags here-- >
</PAR>
  </DOC>

But the file appear like this

<DOC>
  <TITLE ID="96001">test</TITLE>
  <PAR ID="96002">&lt;ul&gt;&lt;BR&gt;&nbsp; &lt;li&gt;&lt;strong&gt;123456789&lt;/strong&gt;&lt;/li&gt;&lt;BR&gt;&nbsp; &lt;li&gt;&lt;strong&gt;987654321 &lt;/strong&gt;&lt;/li&gt;&lt;BR&gt;&nbsp; &lt;li&gt; &lt;/li&gt;&lt;BR&gt;&lt;/ul&gt;</PAR>
  </DOC>
 and when I print the content of the file it appear like this

<ul><BR>  <li><strong>123456789</strong></li><BR>  <li><strong>987654321 </strong></li><BR>  <li> </li><BR></ul>

which I want but not as a pure tags but I want it formatted like this

·      123456789
·      987654321

Can any one help me.
Thanks in advance  


0
Comment
Question by:ALNMOO
3 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
You need to print it from a browser so that the html gets rendered.

Try opening it with Internet Explorer and then printing it.

Cd&

0
 
LVL 7

Author Comment

by:ALNMOO
Comment Utility
when I print it this what i get in the browser

<ul><BR>  <li><strong>123456789</strong></li><BR>  <li><strong>987654321 </strong></li><BR>  <li> </li><BR></ul>

but I want this

·     123456789
·     987654321

Thank you for your response.
0
 
LVL 15

Accepted Solution

by:
Timbo87 earned 125 total points
Comment Utility
If you're trying to store HTML inside of XML, you need to put the HTML in CDATA.

<![CDATA[<b>My HTML tags</b>]]>

CDATA starts with <![CDATA[ and ends with ]]>
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now