Page 1 of 1

importing XML

Posted: Sat Mar 20, 2004 9:40 am
by kendall
im using and shtml document to include an XML document...however when i view it online it includes the xml document but the xml document doesnt get formated from its style sheet. I want to import an XML document into a page how best can i do this?

Kendall

Posted: Tue Mar 23, 2004 11:19 am
by ol4pr0
XSL ?

Posted: Tue Mar 23, 2004 5:06 pm
by Fjook
When you say the xml does not get formatted. What exactly do you see? Do you see the sourcecode right on the page? Also, do you have html on that same page? If yes, I think the browser may not be able to process html and xml as one document. However, I've heard that some browsers are able to do that now, though I cannot tell you which ones.

What I do if I want to include content on an xml page is treat it as an rss feed (ask if you dont know what that is). If I want pure xml output, then I just use the .xml page, obviously thats not your purpose.

In conclusion :), the way SSI works should not cause the problem as far as I understand, I'm pretty sure its something on the client side.

Yours,
Fjook!

importing XML

Posted: Wed Mar 24, 2004 7:27 am
by kendall
Sorry Guys should have given you a better explanation.

The XML doucment has a XSLT style sheet...however when SSI included it i just get the DATA...no tags...and no XSLT formatting.

What is RSS processing.

I was also looking into a PHP function that creates a new file from XML documents
xslt_process
has anyone ever used it?

Now the reason why i am doing th is is that there must be a better way to incorporate XMl data with my design and layout of the website than having to encode it into the XSL document. I find this very awkward especially if i have to change the design. hence the reason i was trying to use SSI. I really thought it wud have worked as it would have been a logical solution.

Kendall

Posted: Wed Mar 24, 2004 8:15 am
by patrikG
[php_man]xslt_process[/php_man].

If you're using XML just as a data-repository and don't need the nodes's relationships etc., you might find xPath useful - provided PHP has been compiled with that extension.

XSL is the natural - and powerful - visual presentation layer to XML. I couldn't see an easier way, but others may disagree.