• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Processing XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Processing XML


  • Subject: Processing XML
  • From: Greg Hulands <email@hidden>
  • Date: Wed, 14 Jan 2004 14:12:20 +1000

HI,
I have never had a need to parse xml before so I am not quite sure how to do it. I am implementing a credit card payment component for my system and the credit card gateway sends and receives xml documents. I can easily generate the xml in a component to send to the gateway, by I am not sure how to parse the returned xml document. Below is an example:


<ewayResponse>
	<ewayTrxnError>No Error</ewayTrxnError>
	<ewayTrxnStatus>False</ewayTrxnStatus>
	<ewayTrxnNumber>10081</ewayTrxnNumber>
	<ewayTrxnOption1>Error</ewayTrxnOption1>
	<ewayTrxnOption2>Error</ewayTrxnOption2>
	<ewayTrxnOption3>Error</ewayTrxnOption3>
   <ewayAuthCode>123456</ewayAuthCode>
   <ewayReturnAmount>200</ewayReturnAmount>
	<ewayTrxnReference>Error</ewayTrxnReference>
</ewayResponse>

What I am essentially after would be doing something like this

String status = parser.stringForAttribute("ewayTrxnStatus");

Is there some simple xml parser that would cater for such a simple document?

Any help is greatly appreciated.

Regards,
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • RE: Processing XML
      • From: Matt Weagle <email@hidden>
    • Re: Processing XML
      • From: Anthony Paras <email@hidden>
    • Re: Processing XML
      • From: Arturo PĂ©rez <email@hidden>
    • Re: Processing XML
      • From: Drew Thoeni <email@hidden>
  • Prev by Date: Re: Format of uploaded files
  • Next by Date: Re: Processing XML
  • Previous by thread: Re: EOModeler Conceptual Question
  • Next by thread: Re: Processing XML
  • Index(es):
    • Date
    • Thread