homepage Welcome to WebmasterWorld Guest from 54.161.166.171
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Javascript / XML search string
Javascript / XML search string
chandrkn




msg:4040080
 2:31 pm on Dec 9, 2009 (gmt 0)

Hello Everyone,

I am new to Javascript. I am developing a Javascript code to create a HTML table.
I need to search the xml file for the string and then read the tags related to the string searched..

Here is the example :
<file>
<name>file_name.txt</name>
<decode>0</decode>
<test>0</test>
<log_file>log_file_name.txt</log_file>
</file>

So, I need to search for file_name.txt and based on the search results, I need to read the decode, test, log_file tags and enter these values in the table.

I would appreciate if you could tell me how to search for the string and read the tags.

Regards
Kiran

 

httpwebwitch




msg:4044185
 4:02 pm on Dec 16, 2009 (gmt 0)

Javascript is not very good at parsing XML. Yeah it's possible, but the APIs differ in various browsers, making cross-browser scripting with XML challenging. But there are open-source libraries available that simplify the task - try searching for "xml parser for javascript" and a few candidates show up.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved