Including a xml file in the head tag

Including a xml file in the head tag

am 18.09.2007 22:45:54 von Harry Bellafonte

Hi

How do I include a xml file into the head tag? I know how to include a
stylesheet and javascript file but don't have a clue how to include a
xml file into my html code.

Any help will be appreciated.

Regards

Re: Including a xml file in the head tag

am 19.09.2007 10:48:24 von dorward

On Sep 18, 9:45 pm, Harry Bellafonte wrote:
> How do I include a xml file into the head tag? I know how to include a
> stylesheet and javascript file but don't have a clue how to include a
> xml file into my html code.

There are various data formats which are expressed in XML (FOAF, RSS
and ATOM spring to mind) which can be referenced from an HTML document
(although not 'included'). You might also be wanting to do something
with a custom format (perhaps from JavaScript).

You'll need to provide more information about what you want to achieve
before we can really help.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: Including a xml file in the head tag

am 19.09.2007 11:29:56 von Harry Bellafonte

On 19 sep, 10:48, David Dorward wrote:
> On Sep 18, 9:45 pm, Harry Bellafonte wrote:
>
> > How do I include a xml file into the head tag? I know how to include a
> > stylesheet and javascript file but don't have a clue how to include a
> > xml file into my html code.
>
> There are various data formats which are expressed in XML (FOAF, RSS
> and ATOM spring to mind) which can be referenced from an HTML document
> (although not 'included'). You might also be wanting to do something
> with a custom format (perhaps from JavaScript).
>
> You'll need to provide more information about what you want to achieve
> before we can really help.
>
> --
> David Dorwardhttp://dorward.me.uk/http://blog.dorward.me.uk/

Hi

You are right I will explain why I want this.

I have a flas file ( .swf) file that needs settings that are in the
xml file. The flash file will only work if the xml file is in the same
directory. The problem is that the web environment (Webshere WCM) in
which I am creating the webpages does not allowe to place files ( css,
jpg, javascriptfiles, etc) at operating system level. Those files has
to be included in the webtool as fileresources. I have created a
fileresource for the xml file in the webtool, only that did not work.
Thats why I want to include the xml file ( just like I did with the
css files and javascript files) in the HEAD tag.

I hope it makes any sense what I am saying

Regards

Re: Including a xml file in the head tag

am 19.09.2007 13:24:07 von Steve Pugh

On Sep 19, 10:29 am, Harry Bellafonte wrote:
> On 19 sep, 10:48, David Dorward wrote:
> > On Sep 18, 9:45 pm, Harry Bellafonte wrote:
>
> > > How do I include a xml file into the head tag? I know how to include a
> > > stylesheet and javascript file but don't have a clue how to include a
> > > xml file into my html code.
>
> > There are various data formats which are expressed in XML (FOAF, RSS
> > and ATOM spring to mind) which can be referenced from an HTML document
> > (although not 'included'). You might also be wanting to do something
> > with a custom format (perhaps from JavaScript).
>
> > You'll need to provide more information about what you want to achieve
> > before we can really help.
>
> You are right I will explain why I want this.
>
> I have a flas file ( .swf) file that needs settings that are in the
> xml file. The flash file will only work if the xml file is in the same
> directory. The problem is that the web environment (Webshere WCM) in
> which I am creating the webpages does not allowe to place files ( css,
> jpg, javascriptfiles, etc) at operating system level. Those files has
> to be included in the webtool as fileresources. I have created a
> fileresource for the xml file in the webtool, only that did not work.
> Thats why I want to include the xml file ( just like I did with the
> css files and javascript files) in the HEAD tag.

Do you know for sure that your SWG can read the XML from the head of
the HTML document? If not then it may well be a wasted exercise
working out how to include it there.

I've had the same problem a few times recently and the way I solved it
was to get the SWF altered so that it can pick up the XML file from an
absolute URL (which is either hard coded in the SWF or passed in as a
parameter).

The other solution is to alter the Webshare WCM configuration to allow
the placement of the SWF and XML files in the same directory (or
bypass it by placing them directly on the server via FTP or whatever).

Finally as the SWF is acessing the XML over HTTP anyway, you can
configure your server to redirect from /same-directory-as-swf/the.xml
to /some-other-directory/the.xml.

And, one more thing to check. At least once I ran into a problem where
the SWF was written assuming that the SWF and the XML file would not
only be in the same "directory" as each other but would be in the same
"directory" as the HTML calling the SWF. That sort of assumption is
often a bad idea (in my case I wanted to call in all assets, including
SWFs, from a separate host name).

Steve

Re: Including a xml file in the head tag

am 19.09.2007 14:37:44 von Harry Bellafonte

On 19 sep, 13:24, Steve Pugh wrote:
> On Sep 19, 10:29 am, Harry Bellafonte wrote:
>
>
>
>
>
> > On 19 sep, 10:48, David Dorward wrote:
> > > On Sep 18, 9:45 pm, Harry Bellafonte wrote:
>
> > > > How do I include a xml file into the head tag? I know how to include a
> > > > stylesheet and javascript file but don't have a clue how to include a
> > > > xml file into my html code.
>
> > > There are various data formats which are expressed in XML (FOAF, RSS
> > > and ATOM spring to mind) which can be referenced from an HTML document
> > > (although not 'included'). You might also be wanting to do something
> > > with a custom format (perhaps from JavaScript).
>
> > > You'll need to provide more information about what you want to achieve
> > > before we can really help.
>
> > You are right I will explain why I want this.
>
> > I have a flas file ( .swf) file that needs settings that are in the
> > xml file. The flash file will only work if the xml file is in the same
> > directory. The problem is that the web environment (Webshere WCM) in
> > which I am creating the webpages does not allowe to place files ( css,
> > jpg, javascriptfiles, etc) at operating system level. Those files has
> > to be included in the webtool as fileresources. I have created a
> > fileresource for the xml file in the webtool, only that did not work.
> > Thats why I want to include the xml file ( just like I did with the
> > css files and javascript files) in the HEAD tag.
>
> Do you know for sure that your SWG can read the XML from the head of
> the HTML document? If not then it may well be a wasted exercise
> working out how to include it there.
>
> I've had the same problem a few times recently and the way I solved it
> was to get the SWF altered so that it can pick up the XML file from an
> absolute URL (which is either hard coded in the SWF or passed in as a
> parameter).
>
> The other solution is to alter the Webshare WCM configuration to allow
> the placement of the SWF and XML files in the same directory (or
> bypass it by placing them directly on the server via FTP or whatever).
>
> Finally as the SWF is acessing the XML over HTTP anyway, you can
> configure your server to redirect from /same-directory-as-swf/the.xml
> to /some-other-directory/the.xml.
>
> And, one more thing to check. At least once I ran into a problem where
> the SWF was written assuming that the SWF and the XML file would not
> only be in the same "directory" as each other but would be in the same
> "directory" as the HTML calling the SWF. That sort of assumption is
> often a bad idea (in my case I wanted to call in all assets, including
> SWFs, from a separate host name).
>
> Steve- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Hi

No ,I am not sure that the swf will pick up the xml from the HEAD tag.
Its just a wild guess of which I dont know if it will work. All other
things I have tried didn't worked.

How did you altered the swf file? What kind of program did you use?

I guess you know a lot about WCM. Where can I find the configuration
part where I can set to allow the placement of the SWF and XML files
in the same directory?

I hope I can find a way to get the flash file to work because it looks
very nice.

Regards

Re: Including a xml file in the head tag

am 19.09.2007 15:50:39 von Steve Pugh

On Sep 19, 1:37 pm, Harry Bellafonte wrote:
> On 19 sep, 13:24, Steve Pugh wrote:
> > On Sep 19, 10:29 am, Harry Bellafonte wrote:
>
> > > I have a flas file ( .swf) file that needs settings that are in the
> > > xml file. The flash file will only work if the xml file is in the same
> > > directory. The problem is that the web environment (Webshere WCM) in
> > > which I am creating the webpages does not allowe to place files ( css,
> > > jpg, javascriptfiles, etc) at operating system level. Those files has
> > > to be included in the webtool as fileresources. I have created a
> > > fileresource for the xml file in the webtool, only that did not work.
> > > Thats why I want to include the xml file ( just like I did with the
> > > css files and javascript files) in the HEAD tag.
>
> > Do you know for sure that your SWF can read the XML from the head of
> > the HTML document? If not then it may well be a wasted exercise
> > working out how to include it there.
>
> > I've had the same problem a few times recently and the way I solved it
> > was to get the SWF altered so that it can pick up the XML file from an
> > absolute URL (which is either hard coded in the SWF or passed in as a
> > parameter).
>
> > The other solution is to alter the Webshare WCM configuration to allow
> > the placement of the SWF and XML files in the same directory (or
> > bypass it by placing them directly on the server via FTP or whatever).
>
> No ,I am not sure that the swf will pick up the xml from the HEAD tag.
> Its just a wild guess of which I dont know if it will work. All other
> things I have tried didn't worked.
>
> How did you altered the swf file? What kind of program did you use?

I went back to the designer who created the Flash in the first place
and told him that it needed to be changed.

If you (or your client/employer/whoever) have paid for this Flash then
it has to be delivered in a state that is fit for use in your
environment.

> I guess you know a lot about WCM.

I'd never heard of it before I read your post. I'm just commenting on
the sort of thing that might be possible.

Steve