Closed
Bug 559300
Opened 15 years ago
Closed 15 years ago
getElementsByTagName("name")[i].text doesn't work
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: magarcia2222, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 2.0.50727)
Build Identifier: mozilla firefox 3.6.3
When you try to parse a xml document in javascript using the documet.getElementsByTagName("name") doen't work properly. You can access to the property documet.getElementsByTagName("name").length for example, but you can't get the property documet.getElementsByTagName("name")[i].text, where i is one of the index of the element "name"
Reproducible: Always
Steps to Reproduce:
1.Load a xml whith elements an text. Example <root><element>thing<element></root>
2.Try to access to text in <element> (thing) using docuement.getElementByTagName("element").text
3.You get undefinied
That way to access text in element works in IE (yeahh, internet explorer), opera, chrome, and firefox 2
Comment 1•15 years ago
|
||
Can you attach a testcase? Why do you think an XML element should have a "text" property? I don't see it having one neither in Firefox 3.6, nor in Google Chrome.
(The property that does work is "textContent", as defined in DOM Core spec.)
Comment 2•15 years ago
|
||
Please reopen if you come up with additional information. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•