Weil Jimmer's BlogWeil Jimmer's Blog


JavaScript XML Dom 標籤名稱有冒號的情況 getElementsByTagName
No Comments

Published:
Updated:2017-05-19 19:42:34

如下:< > 標籤名稱裡面有冒號的情況,要如何getElementsByTagName,查了不少資料都沒有說…感覺是我不懂XML才會這樣。

只知道JQ搜尋的時候冒號前面要加兩條斜槓,但JavaScript不是。

JavaScript 是

xmlDoc.getElementsByTagName("encoded")[0].childNodes[0].nodeValue;

也就是找尋:xml標籤「冒號」,後方的名稱,而不是搜尋冒號前面的名稱,更不是兩個一塊打上去中間加冒號。

錯誤很多次的心得,這次寫個小筆記。


This entry was posted in Experience, Functions, JS, XML By Weil Jimmer.

About Weil Jimmer

avatar

Hi! Everyone! My name is Weil Jimmer. This is my personal blog. I'm a webmaster of this site. I hope the site will be popular. Now, Let's go! Enjoy gaining more knowledge.
More Details About Me : https://weils.net/profile.php

Leave a Reply

Name*:

Email*:

Website:

Privacy:   

Comment*:

Visitor Count

pop
nonenonenone

Note

歡迎前來本站。

Search

Republic Of China
Privacy is your right and ability to be yourself and express yourself without the fear that someone is looking over your shoulder and that you might be punished for being yourself, whatever that may be.

It is quality rather than quantity that matters.

I WANT Internet Freedom.

Reality made most of people lost their childishness.

Justice,Freedom,Knowledge.

Support/Donate

This site also need a little money to maintain operations, not entirely without any cost in the Internet. Your donations will be the best support and power of the site.
MethodBitcoin Address
bitcoin1NRMVGGpm2T1pmeejisLSEhCXfCefEW9V4
paypal

The Lie We Live

youtube

The Questions We Never Ask

youtube

Support The Zeitgeist Movement

The Zeitgeist Movement

Man

youtube

In The Fall

youtube

Facebook is EATING the Internet

Facebook

Recent Comments

Burhan Uddin on 推薦 "羅馬" 這部影集

sickcatail on STEAM免費序號

包包 on STEAM免費序號

問問題 on 最棒的手機通訊軟體 Telegram

unocme on STEAM免費序號

Categories

Announcement (3)

Bash (2)

C (1)

C# (4)

C++ (1)

Experience (38)

Flash (2)

Free (10)

Functions (35)

Games (13)

General (44)

HTML (7)

Java (12)

JS (7)

Mood (23)

Note (24)

Office (1)

PHP (9)

Privacy (3)

Product (9)

Python (4)

Software (8)

The Internet (15)

Tools (12)

VB.NET (8)

WebHosting (7)

Wi-Fi (5)

XML (4)