473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Fetching the base URL from XML file

Hi All,

I am new to XML and I need some help from you all.
we have a requirement like...

we want to fetch the base URL that is present in the XML file , and getting it displayed in the browser . ( i.e the browser should display the webpage of the URL retreived from the XML file )

Please provide me your suggestions ....

Thanks,
Nazeer
Jun 19 '07 #1
8 2009
Motoma
3,237 Expert 2GB
Could you please elaborate? What language are you using?
Jun 19 '07 #2
we are working with the XUL and Javascript on a project to create a extension in mozilla browser ..
The frontend is desinged with XUL and scripting is done with Javascript.

When a user clicks on the UI element (say a Record-Button ), it prompts a browser window where user can browse thru any websites of his choice . Once he closes the browser window, he gets back to the frontend.

All this activity done by the user in the browser window is saved as a XML file.

Now, We have that details of the url that user browsed in the url tag of type "base".

I have few questions here ...

How can we retrieve the base URL from the XML file ( I need the coding to be done to get this ) and then finally getting this same URL displayed in the browser window, once the user clicks on a button ( say Play ), that we have in the frontend

let me know if i am clear now ..

Thnx,
Nazeer
Jun 20 '07 #3
drhowarddrfine
7,435 Expert 4TB
You would probably have more luck on the javascript forum.
Jun 20 '07 #4
Hi All,

we are working with the XUL and Javascript on a project to create a extension in mozilla browser ..
The frontend is desinged with XUL and scripting is done with Javascript.

When a user clicks on say a Record-Button, it prompts a browser window where user can browse thru any websites of his choice . Once he closes the browser window, he gets back to the frontend.

All this activity done by the user in the browser window is saved as a XML file.

Now, We have that details of the url that user browsed in the url tag of type "base".

I have few questions here ...

How can we retrieve the base URL from the XML file ( I need the coding to be done to get this ) and then finally getting this same URL displayed in the browser window, once the user clicks on a button ( say Play ), that we have in the frontend


Thnx...
Jun 20 '07 #5
Motoma
3,237 Expert 2GB
You would probably have more luck on the javascript forum.
Hold on, I'll move this thread there for you.
Jun 20 '07 #6
gits
5,390 Expert Mod 4TB
we are working with the XUL and Javascript on a project to create a extension in mozilla browser ..
The frontend is desinged with XUL and scripting is done with Javascript.

When a user clicks on the UI element (say a Record-Button ), it prompts a browser window where user can browse thru any websites of his choice . Once he closes the browser window, he gets back to the frontend.

All this activity done by the user in the browser window is saved as a XML file.

Now, We have that details of the url that user browsed in the url tag of type "base".

I have few questions here ...

How can we retrieve the base URL from the XML file ( I need the coding to be done to get this ) and then finally getting this same URL displayed in the browser window, once the user clicks on a button ( say Play ), that we have in the frontend

let me know if i am clear now ..

Thnx,
Nazeer
hi ...

assuming you already have the xml-file ready to parse in your xul-app ... you have to retrieve the element <base> in your xml-file ... this is done by:

document.getElementsByTagName('base');

this gives you a collection of nodes of type 'base'. in case you only have one node ... you may get the value the following way:

Expand|Select|Wrap|Line Numbers
  1. var base_list = document.getElementsByTagName('base');
  2.  
  3. // assuming there is no other child element contained by the node
  4. // we retrieve the textNode and its value
  5. var base_url = base_list[0].firstChild.nodeValue;
  6.  
kind regards ...
Jun 20 '07 #7
acoder
16,027 Expert Mod 8TB
Merged threads.
Jun 20 '07 #8
Hi,

Thnx for the info .. it was quite helpful...

Regards,
Nazeer
Jun 22 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: randomtalk | last post by:
hi, i want to automate some tasks of gathering photos from web, i tried urllib/urllib2, both ended up without much success (saved gifs with only a border, nothing else).. the code i used was: ...
1
by: asenthil | last post by:
Hai, i had tried to write a string which is fetched from a database into a file.... Here are my codings to write that fetched string into a text file... HANDLE hFile; DWORD wmWritten;...
1
by: ProjectGoldfish | last post by:
Currently im taking this old piece of code $fileName = $_GET; $full = $_GET; $ext = substr(strrchr($fileName, "."), 1); $path = "../../../include/images/mini/"; if($full) $path =...
5
by: Bhavesh | last post by:
Hello genious people, I m trying to insert a LARGE text from Multiline Textbox into my table of sqlserver2000. I m using vs-2005. Please note that I dont want to store blob data From FILE...
1
by: Bhavesh | last post by:
Hi Bruce, Thanks For Reply. U were right, Needed to pass string , but also need to pass size of Data( instead of 16, passed actual length of data). So that worked for me & didn't get any...
2
by: SunshineInTheRain | last post by:
I'm trying to modify a long long code within a button click by make the insert/update/delete/select using the same transaction. Purpose is to make sure every operation can be rollback instead of some...
3
by: CF FAN | last post by:
hi i am trying something like this but is not working.. <cfif document.recordcount IS NOT 0> <cfhttp method="get" url="http://abc.com/news" resolveurl="yes" timeout="60" throwonerror="yes" ...
1
by: Ivan Ven Osdel | last post by:
>----- Original Message ----- Here's a function I wrote for checking remote or local file existence. It works for me but admittedly I haven't tested many cases with it. Also its currently...
4
by: tokcy | last post by:
HI every one, i am using tooltip on click of link and i want like when that tooltip open then background window would be blure(). can anyone help me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.