• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

retrieving nodes from xml

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have to retrieve all the nodes from an xml doc, that end with 'CLS'. The first character could be anything.
Is there anyway to do this, without comparing each and every node name?

can I use getElementByTagName(String) where the string can contain any wild card characters to do the search?
or is there any other recourse to this?

Thanks in advance
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there anyway to do this, without comparing each and every node name?



No

can I use getElementByTagName(String) where the string can contain any wild card characters



No

Assuming that "retrieve all the nodes" means you want a reference to every Node object with the specified name derived from parsing the original document there really is no way around looking at every node.

Bill
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. I'd be extraordinarily surprised to learn that "@javaranch" is your family name. You can change your display name here. Thanks!
 
priyam rao12
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bill

"you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. I'd be extraordinarily surprised to learn that "@javaranch" is your family name. You can change your display name here. Thanks!"

I have given my real first and last name,but it complained saying that its not unique,??? hence a unique lastname. Anyway I can change it to be more realsitic.
reply
    Bookmark Topic Watch Topic
  • New Topic