SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist rockyracoon's Avatar
    Join Date
    Apr 2003
    Location
    Burbank
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can You Parse XML with JavaScript?

    I have content I would like users to be able to parse. Unfortunatly I cannot count on them having a server capable of server-side scripting. So HTML & JavaScript are my only options.

    I found a JS that grabs a remote source and pulls document.write variables, but the content I have can be up toa full page! That seems liek a bit much. It would be great if I could use JS to parse an XML version of the content....

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, and no... You can use JScript (= works in IE only) to create ActiveXObjects like DOMDocument etc
    http://msdn.microsoft.com/library/en...rence_2kdh.asp

    A little bit more complicated if you want the page to work in Mozilla and other browsers too

  3. #3
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm completely green about server-side stuff, so forgive me if I'm wrong...

    ...'Server-Side' refers to *your* server, not those at the users' end.
    Server-side things are done on your server *before* the page is sent to your users' browsers as a done deed.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't tried any of them, but there are several xml parsers written in javascript:
    http://www.google.com/search?q=javas...2xml+parser%22

  5. #5
    SitePoint Evangelist rockyracoon's Avatar
    Join Date
    Apr 2003
    Location
    Burbank
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot guys!

  6. #6
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This one is the most widely used and supported, AFAIK:
    http://xmljs.sourceforge.net/
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •