473,657 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DOM-XML: get Elements with namespaceprefix

Hello!

I am working with the XML-DOM-Extension. I want to change the content of a
variable in a XSL-Document. The following testscript works well.
$dom = domxml_open_fil e(getcwd()."/einzelnes_item. xsl")
$elements = $dom->get_elements_b y_tagname("tabl e")
echo count($elements )." Elements<br/>";
for ($i=0;$i<count( $elements);$i++ )
{
$element = $elements[$i];
echo " Tagname: ".$element->tagname();
$border = $element->get_attribute( "border");
echo " border: ".$border."<br> ";
}

But if I try to use $elements =
$dom->get_elements_b y_tagname("xsl: variable") I get an array with one
element (even if there are more variables) and the rest of the code doesn't
work at all. When I call a funtion of $element I get an error:
Fatal error: Call to a member function on a non-object.

Do I not can use namespacesprefi xes? Or did I made a mistake?

TIA

Susanne
Jul 16 '05 #1
0 2026

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5595
by: Kookymon1 | last post by:
This is an attempt to respond to an older question (several months). Date: 2002-03-07 13:10:23 PST Subject: On the Common DOM API and Applets. The original message was: >LiveConnect and the JSObject technique are Netscape technologies (or >related to). I want an alternate way of accessing the HTML DOM from >Java Applets and to call Methods on the Applets from JavaScript.
0
1631
by: Thorsten Meininger | last post by:
As far as I know one could access DOM trees through "pure" DOM and through JAXP using DOM. I have seen dozends of examples but I could not find any differences between the two methods. Which java statement s are typically for JAXP and which for pure DOM? For example could one say that all source code examples using Factories (DocumentBuilderFactory for DOM resp. SAXParserFactory for SAX) are JAXP method based ??? That would mean all...
3
2057
by: Jack Fox | last post by:
Ideally I could drill down through objects, events, methods, and properties... ....and it would tell me where the IE (not DHTML) and Netscapte DOMs are the same and where they differ, ....and it would actually document objects, events, methods, and properties, rather than just listing their names. Does such a thing exist?
4
1831
by: Robert | last post by:
Hi, which DOM version (level) should I learn? I've seen that there is a DOM level 3, but is there any support for it already? -- Rob
3
1247
by: drhowarddrfinedrhoward | last post by:
I am learning JavaScript along with the W3C DOM and web programming at the same time. Just when I thought I had the basics figured out I had a wrench thrown into my understanding. When you go to Netscapes JavaScript specs page, they list pages for versions 1.3 through 1.5. I sat down to read the client side information but it is labeled as "obsolete". But if I go to version 1.5 there is no information about client side programming. ...
7
1696
by: Christopher Benson-Manica | last post by:
Why is building a table with the DOM slower than using an array? IOW, why is var table=document.createDocumentFragment(); for( var i=0; i < 4000; i++ ) { tr=table.insertRow( table.rows.length ); td=tr.appendChild( document.createElement('td') ); td.appendChild( 'foo' ); } someElement.appendChild( table );
9
1655
by: Lachlan Hunt | last post by:
Hi, I've written some javascript to implement DOM 2 Events in IE (addEventListener, removeEventListener, etc) and I would like to know which browsers it works in. I've tested it in Firefox 1.0.6, Deer Park Alpha 2, Opera 8.02 and IE6 and IE7 Beta 1, all on WinXP SP2. Could some of you please take a look at the test pages in any browser you have available to you, and let me know if it works or if you encounter any problems? If...
9
1996
by: Patient Guy | last post by:
Taking the BODY element as an example, all of its style attributes ('alink', 'vlink', 'background', 'text', etc.) are deprecated in HTML 4.01, a fact noted in the DOM Level 2 HTML specification. The DOM specification does not explicitly itself deprecate the use of attributes however for the element in the interface definition section I read. Is there text in the DOM specification that states specifically that the DOM specification...
4
1473
by: YAD | last post by:
How do you decide which DOM level you should use? I've been told level 2 is the "modern" approach, but also saw a website that said use level 0 any time you can. Should you use higher-level code where lower-level code works? Does lower-level code fail in modern browsers? What are the issues you have to worry about? -- Yet another Dan
1
2323
by: GoodMan | last post by:
So I was looking for a way to be able to parse images (<img>) from a given url. It so happened that I stumbled upon a nice little piece of code called "PHP Simple HTML DOM Parser" found here : http://simplehtmldom.sourceforge.net/ On the first page, I made a form where you can enter a URL, and then the script tries to fetch the images. It was indeed what I needed. A simple code like this did a portion of the job:
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8504
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7337
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.