Hi Gino,
  why don't you try to use the javax.xml.parsers package?

When you have the xml file in a string write it in a File object
myXml, then do:

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(myXml);

that should work!
bye,
      Daniele

2006/12/6, Gino Pacitti <[EMAIL PROTECTED]>:

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com

This email sent to [EMAIL PROTECTED]




--
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to