473,385 Members | 2,069 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,385 software developers and data experts.

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_file(getcwd()."/einzelnes_item.xsl")
$elements = $dom->get_elements_by_tagname("table")
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_by_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 namespacesprefixes? Or did I made a mistake?

TIA

Susanne
Jul 16 '05 #1
0 2011

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

Similar topics

0
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...
0
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...
3
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...
4
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
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...
7
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...
9
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,...
9
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. ...
4
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...
1
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 :...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.