• 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
Help With XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help With XML


  • Subject: Help With XML
  • From: Gino Pacitti <email@hidden>
  • Date: Wed, 6 Dec 2006 19:56:16 +0000

Hi All

I am working with an SMS company that supplies a Base64 encoded image as part of an XML form submitted to my app.

If I am off track please point me in the right direction.

I am having it sent to a Direct Action but I am not sure what type of data type I should have...
It is being sent so - Standard XML document posted as a form in a single field called XmlMsg


I need to process it so this is what I am doing:

    public WOActionResults MMSAction(){

String data = (String)this.request().formValueForKey("XmlMsg");
org.jdom.input.SAXBuilder builder = new org.jdom.input.SAXBuilder (false);
Document responseDoc = builder.build(data);
Element response = responseDoc.getRootElement();
Element rootElement = response.getChild("bspostevent");
List xmlList = rootElement.getChildren("field");


But I think this is wrong as I get a file not found error on the builder.build(data); part!

This is an excerpt from the XML DTD:

<!-- bspostevent is an XML language - Typical usage: <?xml version="1.0"?> <bspostevent> <field name="MobileNumber" type="string">+4477111222333</field> <field name="Text" type="string">An SMS message body being handled</field> </ bspostevent>-->

Can anyone help to give me some direction as the the correct syntax to be able to work with the elements...


Gino




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Help With XML
      • From: "Daniele Corti" <email@hidden>
  • Prev by Date: Re: Weird Database Error Now..
  • Next by Date: Consistent reads
  • Previous by thread: Re: Weird Database Error Now..
  • Next by thread: Re: Help With XML
  • Index(es):
    • Date
    • Thread