f



Help trying to get the tagName of a Text Node

Hello,
I have parsed my XML document into a Document object and now I'm
running through each node.  When I get to a Text Node I want to be
able to grab that node's tag name (ex. <wsa:meta>text</wsa:meta> and
grab the "wsa:meta").  With Element nodes it's easy.  I can cast the
Node as an Element and use .getTagName().  But casting a Text Node as
an Element throws an exception and a similar getTagName method does
not exist for Nodes.  I've done a ton of research online and can't
seem to find a solution.  Anybody have any ideas?
Thanks!
0
10/12/2009 6:47:33 PM
comp.lang.java.help 13339 articles. 0 followers. Post Follow

2 Replies
381 Views

Similar Articles

[PageSpeed] 24

In article 
<a138d440-4c5c-4270-9b8d-109b874c94ab@y21g2000yqn.googlegroups.com>,
 scoobster <ilikefatalbert@netzero.net> wrote:

> Hello,
> I have parsed my XML document into a Document object and now I'm
> running through each node.  When I get to a Text Node I want to be
> able to grab that node's tag name (ex. <wsa:meta>text</wsa:meta> and
> grab the "wsa:meta").  With Element nodes it's easy.  I can cast the
> Node as an Element and use .getTagName().  But casting a Text Node as
> an Element throws an exception and a similar getTagName method does
> not exist for Nodes.  I've done a ton of research online and can't
> seem to find a solution.  Anybody have any ideas?
> Thanks!

The problem is that the Text Node in your scenario isn't the "wsa:meta" 
part at all, but rather the "text" portion.  So you need to get the 
parent node of the text node.  You'll also want to keep in mind that the 
tag name is not "wsa:meta" there, but a namespace and tag name combined.
-- 
Steve W. Jackson
Montgomery, Alabama
0
10/12/2009 7:30:08 PM
Steve,
Thanks for the help!  I did misunderstand that point, so thanks for
making it clear.  Although I do want to mention that although you are
right about the namespace and tag type distinction, the Element method
getTagName() does return "wsa:meta" and not just "meta".  Which is
exactly what I wanted.  :-)

Thanks for the help buddy!
Todd
0
10/13/2009 12:06:23 PM
Reply:

Similar Artilces:

Help Help Help Help Help
please,help us . we have a seious problem, we are designing a radio controlled car that is guided by the PC, to send the data wireless between the PC and the Car and vice versa. we use 2 transmitter/reciever circuits from 2 seperate radio controlled car each running with a different frequency (27 MHz & 40 MHz)and modify the functionality of each to do the disered work. but on mounting a transmitter(40MHz) and reciever(27MHz) on the car, and attach another transmitter(27MHz) and reciever(40MHz) to the PC; we found that on sending signals from the car to the PC on the transmitter & rec...

help!help!help!help!
I am a student.I am going to make a simulation of a robot (FANUC Robot M-16iB) under the matlab\simulink environment . It is a normal 6DOF robot.I want to realize any angle and any speed (under the max speed) and any position and orientation control. As I just starting to do this new field,I have no experience about it. Can you give me some simulation demo or examples for 6DOF robot? I am very eager to get these.Please write back to me as soon as possible,thank you! Sincerely, Connie&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; zhanglijuan920@sohu.c...

Help Help Help
Q1 I want to know how to show the 8 bit planes of the image?? Q2 And also find edges of image by showing both edge magnitude and direction?? ...

HELP! HELP! HELP
I hope someone out there can solve my mysterious problem. I have tried everything imaginable, even paid $35 to Microsoft to help me, but they were not able to figure out this problem: Here is the problem: I recently created a new database in Access 2002. I took data from an > access 97 database converted one of the tables to access 2002 and then > imported it into a new table in access 2002. but for some strange > reason, every once in a while the data changes to Japanese characters, > it only happens once in a while, but once it happens that record is > lost. i have tried...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my question as soon as you can. Thanks for your help. Regina Pun Select Add/Remove Programs from your Control Panel, find the programs = you want to delete and click the delete button. "Jerry Arzin" <h974483@graduate.hku.hk> wrote in message = news:33b5a863.0406112354.2679fd31@posting.google.com... > Hello, >=20 > I am a reluctant user of the website ntsearch.com. I accidentally > download a Java program called "dict" from an ebook website to my XP > and now every English words that I read from my computer has got a > link with your web. I found it very frustrating when I noticed all the > chinese characters I read from the web now become loads of question > marks. I think it has a link with the program that I accidentally > downloaded from that ebook website. How can I remove the so called > "dict" program and other Java...

HELP! HELP! HELP!
We are currently running R83 v3.1m (33 user) on an old 200 Mhz Pentium with 16Mb Mem and 2.x gif HD (the actual partition is smaller) We have run this for a number of years without ANY significant problems. Last week (just as my family was in the middle of "the move from Hell") the system decides to take a major dump. A bad link of some sort in the ABS area. THEN - the systems disks have disappeared. After much screaming and gnashing of teeth I got the system running again. OH! did I mention that the previous evenings file save tape was bad? Anyhow, the bottom line is that I REALLY need a set of 33 user 3.1m disks. Any Ideas/Help? I do have a 25 user version of r83 v3.1 (no 'm') with a monolith loader diskette (5.25) but it doesn't seem to hook up with the PICK diskettes (just keeps rebooting) If I can get a sister machine running with the 25 user - does anyone have any trick to bump it to 33 user. There must be just a byte or 2 in the ABS area that regulates # of users. Again - Help! Help! Help! Van PS: The reason we haven't upgraded is that I am using a 4GL called Envision that was written a long time ago and about half of it was done in assembler and won't run on any of the later version of PICK. I've been meaning to re-write it in Basic but it's a pretty daunting project. I'd get busy rewriting the software if I were you. If anyone actually has the disks, there's ...

help! help!! help!!!
x=[0 1 10] p=[100 80] how can I get A A=[3x(1) 2x(1) x(1) 1 0 0 0 0; 2x(1) x(1) 1 0 0 0 0 0; 3x(2) 2x(2) x(2) 1 -3x(2) -2x(2) -x(2) -1; 2x(2) x(2) 1 0 -2x(2) -x(2) -1 0; p(1)x(1) p(1) 0 0 -p(2)x(2) -p(2) 0 0; p(1) 0 0 0 -p(2) 0 0 0; 0 0 0 0 -p(2)x(3) -p(2) 0 0; 0 0 0 0 -p(3) 0 0 0; ] In article <fkus3t$11h$1@fred.mathworks.com>, Jim lei <redlightlike@mathworks.com> wrote: >x=[0 1 10] >p=[100 80] >how can I get ...

help help help
hi all im new to linux can anyone tell me the best place to get some help installing programs in linux or best books to read -- --------------------------------- --- -- - Posted with NewsLeecher v3.7 Final Web @ http://www.newsleecher.com/?usenet ------------------- ----- ---- -- - peteware wrote: > hi all im new to linux can anyone tell me the best place to get some > help installing programs in linux or best books to read > > > -- > --------------------------------- --- -- - > Posted with NewsLeecher v3.7 Final > Web @ http://www.newsleecher.com/?usenet > -...

Help! Help! Help!
My daughter has a Dell 2300 that is coincidentally 1 month past the warranty. It will start up and shut off within 1 minute. It doesn't matter if I boot from hard drive, floppy, go into safe mode, or go to setup screen. I don't know how to try to isolate the problem. (Mother board, power supply etc.) Any suggestions? sogs wrote: > My daughter has a Dell 2300 that is coincidentally 1 month past the > warranty. It will start up and shut off within 1 minute. It doesn't > matter if I boot from hard drive, floppy, go into safe mode, or go to > setup screen....

help! help!! help!!! me
hello if x=linspace(1,100,n); p=linspace(100,80,n-1); how can I get A A=[ x(1) 1 0 0 0 0 0 0...0 0; x(2) 1 -x(2) -1 0 0 0 0...0 0; p(1) 0 -p(2) 0 0 0 0 0...0 0; 0 0 x(3) 1 -x(3) -1 0 0...0 0; 0 0 p(2) 0 -p(3) 0 0 0...0 0; 0 0 0 0 x(4) 1 -x(4) -1...0 0; 0 0 0 0 p(3) 0 -p(4) 0...0 0; ....................................... 0 0 0 0 0 0...x(i) 1 -x(i) -1...0 0; 0 0 0 0 0 0...p(i-1) 0 -p(i-1) 0 ...0 0; ......................................... 0 0 0 0 0 0....x(n-1) 1 -x(n-1) -1; 0 0 0 0 0 0....p(n-2) 0 -p(n-1) 0; 0 0 0 0 0 0.... 0 0 p(n-1) 0; ] "Jim lei" <redlightlike@mathworks.c...

Help, Help, Help
As you can probably gather im in need of help. I started a basic JAVA course a week ago as it seems like a very interesting subject. The problem in having is with the IDE we have been asked to use. We are using JCreator, but in order for it to work, we are required to install the Java software development kit and a class library which comes with the course book called avi with is a audio visual interface library which is supposed to make it easier for us to learn the fundimentals of JAVA without having to worry about the input/output. Anyways, I have installed the JAVA SDK from SUN website...

HELP HELP HELP...
Hi everybody there. I have created a GUI in MATLAB's guide application. In the GUI I am appearing on the screen a frame from a camera by pushing a button. My problem that sometimes the application works fine, but some others something is going wrong and I get the following error message: ??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts Error in ==> LEDsFinal>txtGrabFrame_Callback at 164 A(width, i, Blue) = abs(fread(portCMU, 1, 'uint8'))/255; What does the error message mean? What seems to be the problem? How can I overco...

help help help
Sir, Am Avinash.T.J doing my btech AMRITA ...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my ...

HELP-HELP-HELP!!!!!!!!!!
On this site par example: http://communications.siemens.com/cds/frontdoor/0,2241,nl_nl_0_27443_rArNrNrNrN,00.html u have a 3d animation, like many other sites...but if i want to see this a new window opens and i see a icon with ared cross in it. also on sites with games i see this... What is my problem? I have winXP-Pro firewall is out and sec. is on low..... twan1@home.nl (Twan) writes: > On this site par example: > http://communications.siemens.com/cds/frontdoor/0,2241,nl_nl_0_27443_rArNrNrNrN,00.html > u have a 3d animation, like many other sites...but if i want to...

Help!! Help!! Help!!
I wish to vectorize the following code: s = tf('s'); W = logspace(-1,2,50); COMBINATION = combn(W, 2); K = cell(length(COMBINATION), 1); K0 = 1 + (1/(2*s)) + 0.5*s/(0.2*s + 1); % PID controller to be approximated as PI gapValue = zeros(length(COMBINATION), 1); for i = 1:length(COMBINATION) K{i} = (COMBINATION(i,1)*(1 + (1/(COMBINATION(i,2)*s)))); % PI controller end for i = 1:length(COMBINATION) gapValue(i,1) = gapmetric(K0, K{i}); end where K0 is the Nominal transfer function and K is a cell array including transfer functions whose gap metric from K0 are...

Help, Help, Help...
Hei! Im makin a hot INVADERS game with Java but im a newbie with language, so , question is how do i use KeyPressed () function... I hav Applet Runnable... -!Hei!- Here is my problem... public class TestinKeys extends Applet implements Runnable .... .... public void run () { while ( true ) { KeyEvent ke; if ( ke.getKeyChar() == 'a' ) g_TykkiX ++; .... .... What is Wrong, im tryin to make that Invaders game but i dont know how to read keyboard with Runnable Java code... JariTapio <JariTapio@pp.inet.fi> wrote: > publi...

help help help
I need to refresh my C knowledge quickly. I will be reading code for simple industrial type controls like motor controllers, valve drivers, etc This software is pretty simple, 3000 lines max. The executable is embedded in flash on the processor chip. Actually I haven't seen it yet. I haven't looked at C or done any programming in ages. I'm looking for a simple programming suite that will run on my WinXP (NTFS) computer. Something that doesn't take really long to get up to speed with. Simple is better. I just need to practice and remember and do some simple experi...

Help Help Help
Hello, I am a reluctant user of the website ntsearch.com. I accidentally download a Java program called "dict" from an ebook website to my XP and now every English words that I read from my computer has got a link with your web. I found it very frustrating when I noticed all the chinese characters I read from the web now become loads of question marks. I think it has a link with the program that I accidentally downloaded from that ebook website. How can I remove the so called "dict" program and other Java Scripts from my computer? This is very urgent and please answer my ...

HELP HELP HELP
Hello everyone, I am a freshmen at a computer university and also new to C++ . I havent used C before either but been through PASCAL and GW-BASIC. Can someone please tell me the link to download the C++ compiler which can run on my Windows XP Professional Edition. Thanks. ByE. Yours forever in Digital Paradise uSmAn could have typed what u wanted in google. "Usman" <game_pk@hotmail.com> wrote in message news:buobgo$kaacm$1@ID-217624.news.uni-berlin.de... > Hello everyone, > I am a freshmen at a computer university and also new to C++ . I havent used > C before eit...

HELP HELP HELP
Hi! All, I am an Interactive Media Designer and know very less about asp but the basic concept behind. I got to make an online test(Exam) in asp which has a login (frm access database) panel. Can any one direct me to a free source so that I can simply pick the project and customize it. Thnaks in Advance Raj.Design In article <1112007306.454441.207430@f14g2000cwb.googlegroups.com>, raj.design@gmail.com enlightened us with... > Hi! All, > I am an Interactive Media Designer and know very less about asp but the > basic concept behind. I got to make an online te...

Getting help from CIWAS: help us to help you
How to get help from this group, and how to construct a minimised test case: http://www.spartanicus.utvinternet.ie/help_us_help_you.htm -- Spartanicus Spartanicus wrote: > How to get help from this group, and how to construct a minimised > test case: > http://www.spartanicus.utvinternet.ie/help_us_help_you.htm Perhaps we could call this the Jerry Maguire principle. :-) It's a nice document to be able to refer folks to. I had long thought of doing something like that, but never got around to it. Thanks for doing the work. -- Brian (remove ".invalid&q...

How to be helpful, how to get help
Like many people, I find SAS-L enormously helpful and informative. Many people (including me) take a lot of time to be helpful to a lot of other people (including me!). I'd like to make this time be as well-spent as possible. To that end, I wrote a page on SAScommunity about how to ask a statistics question: http://www.sascommunity.org/wiki/How_to_ask_a_statistics_question I'd like to extend that. I answer questions about statistics, and I know how easy it is to assume people know things that they don't know. I ask questions about DATA STEP and I know how easy it is to ask qu...

TRYING TO CREATE A SIMPLE FORM. HELP HELP HELP!!!!
trying to make a simple form, just an empty window with no button. ive tried this import javax.swing.*; import java.awt.*; import java.util.List; import java.util.*; public class Canvas { private static Canvas canvasSingleton; public static Canvas getCanvas() { if(canvasSingleton == null) { canvasSingleton = new Canvas("BlueJ Shapes Demo", 300, 300, Color.white); } canvasSingleton.setVisible(true); return canvasSingleton; } } but it doesnt work :( any ideas guys? Newtbo...

Web resources about - Help trying to get the tagName of a Text Node - comp.lang.java.help

Internet forum - Wikipedia, the free encyclopedia
They differ from chat rooms in that messages are at least temporarily archived. Also, depending on the access level of a user or the forum set-up, ...

Internet forum - Wikipedia, the free encyclopedia
They differ from chat rooms in that messages are at least temporarily archived. Also, depending on the access level of a user or the forum set-up, ...

池大治的日志 - 网易博客
池大治的日志,简单分析2009年互联网变化,期待如雪般整洁的三网市场,池大治的网易博客,最苍白的东西,是语言.,长期关注TMT市场发展, 为中国互联网发展提供精神弹药. 目前主要做移动互联网方面的分析工作. 转载请注明作者及出处,如有疑问请给我留言即可.

章夫的日志 - 网易博客
章夫的日志,南闽之行04:在厦门感受陈嘉庚,高校不是市场招生不是买卖,废除“嫖幼罪”正当其时,一张支票牵出家族权力图谱,“工程腐败”为何“前腐后继”?,昂山素季:在诺贝尔和平奖颁奖典礼上的演讲,侮辱公众智商比抽“九五至尊”更恶劣,三沙市有军事目的,天经地义,官场小说何以这么热?, ...

老排长的日志 - 网易博客
老排长的日志,你流着口水看完的美食~壮阳大虾,最远的你是我最近的爱(美女专柜),经典美食之蒸菜食谱,这里会是你的最爱,古今中外字画走廊,白璧无瑕素雪纯,名石名雕,中国书法名城 临沂书法城石刻,古玉,铜雕艺术,老排长的网易博客,欢迎来我家,

阿丁的日志 - 网易博客
阿丁的日志,【无尾狗】书评4 阿乙——两腿之间的命,【无尾狗】书评3 温情的秃鹫,【无尾狗】书评2 这文字的真诚压在心上很重,【无尾狗】书评1 人如秃鹫,【胡天黑帝】之大玩家汉灵帝,【无尾狗】出来了,《坚果》问世 才子(才女)速来,【胡天黑帝】之断背山上说哀帝,【文学“撸瑟儿”理 ...

艾小柯的日志 - 网易博客
艾小柯的日志,通往内心世界的自由之路,墨尔本国际电影节手记,温柔的残酷,残酷的温柔,从悉尼到墨尔本,沧海月明总有时,醉,伟大的不归路,A Love that Burns,电影的意义·一封信,这一刻,我只要悲伤,艾小柯的网易博客,四处游荡的艾小柯,如无特别说明,本博客内容均为原创。 ...

南桥的日志 - 网易博客
南桥的日志,让新农村“更上一层楼”,开会发言和前列腺发炎,古奥运的传承,都是辩论惹的祸,泛滥的枪支文化让人忧虑,游戏的诱惑,[转载]: 亚洲的全球化公司有哪些?,Too much education too early may not help learners,“软着陆”的美国 ...

卓别灵的日志 - 网易博客
卓别灵的日志,苦命坎坷厨师之路(2),苦命坎坷厨师之路(1),好久没有更新博客,是我点的火,《小的是美好的》,ESQUIRE介绍我最喜欢的影评人,《诗》,非诚勿扰2,拖拉机手的福音,咸鸭蛋,钓-1-鱼-1-岛和九-1-八,卓别灵的网易博客,你要用光明定义黑暗,用黑暗定义光明。,

眺望幸福的日志 - 网易博客
眺望幸福的日志,郑州美信医院不孕不育诊疗中心简介,如何扫除孕期不适?,孕期恰当抚摸腹部胎儿更聪明,郑州美信医院网易博客访问量20000,中医中药治疗不孕不育症的独特优势,孕期忌用香皂洗乳房,【引用】世间最美的情诗——仓央嘉措,输卵管堵塞是否影响正常排卵?,输卵管造影会引起感染吗?,输卵管不孕 ...

Resources last updated: 3/9/2016 1:38:57 AM