Hemanshu Pandey

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromHemanshu Pandey
ToMe
SubjectEasier version of XML importing script.
Date13 August 2008 08:14
Hi,

Your work is excellent and i am using a lot of stuff from your website to
clean up my web design work.

I am a webdesigner and have very little knowledge of programming.
HTML/[photo editing] using [brand] is what i am good at!

My current problem is with  a site for client ([company]) where they have an
xml import function for news which is updated daily. This information has to
be displayed in a small table on my sites homepage and then it can update
automatically.

So far i dont have a clue and would appreciate any help here. Your XML
import script seems to be perfect so i would be grateful if you could guide
me to use it on the website.

The site in question is [URL]

The section is [brand] News Overview which has to be updated via XML import.

The XML information is as follows:

1. Scan export file 1 for the latest news and get the URL of export file 2
URLs of export file 1:
English: [URL to XML file]
German: [URL to XML file]

Here you will find a list of current corporate news of international
relevance. In export file 2 you will find details on a particular news
release such as the headline and the link to the news release on the [brand]
Server.
Explanation of the file structure of export file 1:
Tag 	Description
<language> 	News language: EN = English or DE = German
<baseurl> 	Prefix URL export life 2
<pino> 	Logical number of the news
<docid> 	Unique ID of the news
<modified> 	Date and time of the last modification of the news
	
Example of export file 1:
<?xml version="1.0" encoding="iso-8859-1" ?>
<export>
    <language>EN</language>
    <baseurl>[URL]</baseurl>
    <pi>
          <pino>2008-0198</pino>
          <docid>32F02B308852E391C125744800322C5B</docid>
          <modified>2008-05-13 17:13</modified>
    </pi>
</export>

2. Access export file 2 to get the headline and the link to the
[brand] Server
URL of export file 2:
To get export file 2 with the headline of a news item and the link to the
news item on the [brand] Server, you have to combine the <baseurl> and
<docid> of export file 1, e.g. [URL]

Explanation of the file structure of export file 2:
Tag 	Description
<baseurl> 	Prefix URL export life 2
<pino> 	Logical number of the news
<language> 	News language: EN = English or DE = German
<modified> 	Date and time of the last modification of the news
<date><time> 	Date and time of publication
<topline> 	1st part of the headline
<headline> 	2nd and main part of the headline
<underline> 	3rd part of the headline
	
Example of export file 2:
<piexport>
   <pihead>
      <baseurl>[URL]</baseurl>
      <pino>2008-0198</pino>
      <language>EN</language>
      <modified>2008-05-13 17:13</modified>
   </pihead>
   <pibody>
       <date>2008-05-13</date>
       <time>11:30</time>
       <topline>[article]</topline>
       <toplineexport>[article]</toplineexport>
       <headline>
       [article]
       </headline>
       <headlineexport>
       [article]
       </headlineexport>
       <underline>[article]</underline>
       <underlineexport>[article]</underlineexport>
   </pibody>
</piexport>

Link to news release on the [brand] Server:
<baseurl> of export file 2 and <docid> of export file 1, e.g. [URL]

Appearance of an imported news on a [brand site]:
<date>
<toplineexport>
<headlineexport>
<underlineexport> <link ">> more">

thanks

hemanshu pandey
FromMe
ToHemanshu Pandey
SubjectRe: Easier version of XML importing script.
Date15 August 2008 21:13
Hemanshu,

> Your XML import script seems to be perfect so i would be grateful if
> you could guide me to use it on the website.

All my script will do is to simplify the XML importing, so that you don't
have to worry about all the various browser issues. It imports the XML, and
presents you with a document object for the DOM of the imported XML
document.

You would still need to write the code that steps through that DOM, extracts
what is needed, and inserts it into the document. This would be accomplished
using DOM scripting, which is discussed in detail in my tutorial:
http://www.howtocreate.co.uk/tutorials/javascript/dombasics

You will need knowledge of how to manipulate the DOM. It's not too
complicated, and should be easy enough for anyone familiar with JavaScript
to implement - with the help of that tutorial if needed. If you are unable
to write this code for yourself, then you will need to hire a client-side
(JavaScript) developer who can produce and maintain that script for you.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.