cancel
Showing results for 
Search instead for 
Did you mean: 

XML string parsing issue

svast
Champ on-the-rise
Champ on-the-rise
Hi there : I have lots of trouble when I want to parse XML in Webscript (in Javascript or FTL, i can't get it to work).
The XML is stored as a property of a alfresco node.

I get the XML  with Javascript:
var xmlstring = node.properties["ph:ARActeXml"].content;

I can pass it to the Freemarker template to verify it is XML string
model.myxmlstring = xmlstring

So I see I could use that XML string in either Javascript and/or Freemarker engine. I am just lacking the API.
But how can I parse it to retrieve some property inside it?
I am running Alfresco Community 2.1, and it looks like the RHINO xmlNodeModel, new XML,… have not been included in that version.

Please any kind of help will be apreciated; i looked at the tutorials but the methods all failed  Smiley Sad
10 REPLIES 10

pmonks
Star Contributor
Star Contributor
As of version 2.2, Alfresco bundles a version of Rhino that supports E4X directly.  There's also a workaround for earlier versions of Alfresco described at http://issues.alfresco.com/browse/AR-1720 that's safer than upgrading the Rhino JARs themselves.

Cheers,
Peter