my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes DOMParser problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DOMParser problem" Watch "DOMParser problem" New topic
Author

DOMParser problem

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

hi all

Actually i dont know where to put exactly a XML related question, so lastly i put it into this section

Her is my problem:
i want to put a XML files element name and its encloses text data as 'Key , Value ' pair in HashMap instance. I wrote a code but , not able to do exactly as above..

here is my try

list is my instance of HashMap class.


when i iterate thru map , i got following result :
[output]
=9679623159ec4a51a9
Key=s
ROOT=Request
[/output]

my xml file is :
[xml]
<Request>
<Key>9679623159ec4a51a9</Key>
</Request>
[/xml]

Thanks in advance


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Actually i dont know where to put exactly a XML related question, so lastly i put it into this section

We have an XML forum, so I'll move this over there.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

hi all

i just solve the problem, it required a 15 minute break and sip of hot coffee !!

i just take temp string and stored a element value which i take from Node.ELEMENT case and in Node.TEXT , i put it with text value

 
jQuery in Action, 2nd edition
 
subject: DOMParser problem
 
Similar Threads
Fresher ! need help
Suppress text nodes in output when empty
Pretty Print SOAP message
normalize( ) in DOM
Building XML