Results 1 to 2 of 2

Thread: Need help on creating a parsing script...

  1. #1
    Join Date
    May 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Need help on creating a parsing script...

    Hi all, I have been trying to create a little script using PHP, that would filter a XML-formatted purchased order summary, to find out within that order summary file, which purchased order(s) contains a particular item, and that order(s) is going to be sent to a certain zip code.

    However, after thinking a bit about my needs, I think using Javascript to create a client side script, will suit my needs better, but I am not that familiar with Javascript , thus I hope someone in this forum is kind enough to offer me some help.
    --------------

    As for the script,

    1) It needs to take the XML-formatted order summary as an input, which within that XML file, there are multiple purchased orders.

    2) It needs to find out which order contains a specific item, and if it does, whether or not that order is going to ship to a certain zip code.

    3) Then it needs to output a XML file, which is a summary of those orders that fit the above criteria.
    --------------

    How difficult it is to write a script with Javascript to perform the above task? If anyone is kind enough to help out, please let me know via email. Thanks in advance!

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Joe-W
    Hi all, I have been trying to create a little script using PHP, that would filter a XML-formatted purchased order summary, to find out within that order summary file, which purchased order(s) contains a particular item, and that order(s) is going to be sent to a certain zip code.
    So presumably this script is only going to be used by someone reviewing received orders (report generation, effectively), not a customer?

    [...] How difficult it is to write a script with Javascript to perform the above task?
    It's hard to say as you haven't provided the DTD, but it could be a lot of work to do from scratch. There may be existing code libraries that perform XML parsing implemented in ECMAScript/Javascript, but I know PHP has an XML parser.

    There's also the question of data origin. That may affect how workable a client-side script may be. So in summary, it is possible, but you'll have to provide more information.

    Mike

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
  •