|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Here's a tough one!! (CDATA)
I have an XML file I am responsible for, but the system it resides on and the ASP page that call it are not available to me--- so i put together some html to call the file and display its contents. I used CSS to mock up the server's ASP page.
So, my issue is small and deals with the displayed output--- there are sections of CDATA that i need parsed and not ignored as they are when going into the ASP server. ex: "<description><B><center>DEPLOYMENT: 9/13/2004</center></B></description>" comes out: "<B><center>DEPLOYMENT: 9/13/2004</center></B>" but i still need the html to translate that into hypertext |
|
#2
|
|||
|
|||
|
Well, presentation information - like bold and center - really doesn't belong in your xml anyway. The stylesheet should determine that. That presentation information like this is included in the XML file you're responsible for makes me question the overall approach your organization is taking with whatever they're doing.
You can do it though, but it's a little hard to tell you how you can do it without knowing more about what exactly you're doing with the xml. A couple tips that might help: First, don't escape the html. As long as it's well formed, it isn't going to cause any problems and by escaping it you're basically saying it isn't markup - which it is. Second, if you're pulling this out with xslt, you'll need to use "copy-of" instead of "value-of". I still say though, that the XML should actually just be <description>DEPLOYMENT: 9/13/2004</description> and the XSL should add the <div class="description"></div> around it. Chris Collins crcdesign.net |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Here's a tough one!! (CDATA) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|