Welcome to WebmasterWorld Guest from 54.198.108.19

Forum Moderators: open

Message Too Old, No Replies

Javascript / XML search string

Javascript / XML search string

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

New User

5+ Year Member

joined:Dec 9, 2009
posts: 1
votes: 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

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

Senior Member from CA 

WebmasterWorld Senior Member httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
posts:4061
votes: 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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members