cancel
Showing results for 
Search instead for 
Did you mean: 

XML parser

soeursourire
Champ in-the-making
Champ in-the-making
Could somebody tell me if there is already a XML parser in Alfresco? Do you have example in Alfresco that parse XML files?

thanks
5 REPLIES 5

soeursourire
Champ in-the-making
Champ in-the-making
And please tell me which is the best to use to parse XML files compatible with Alfresco (Xerces, XML query…?)?

I also would like your advice on my classes organization: imagine that I would like to choose some hobbies for each user and one hobby can be chosen by multiple user and a user can have multiple hobbies.  Then I want to create a class Hobby and a class LinkHobbyUser. Is it then better to create a class Hobby subclass of NewUserWizard (and LinkHobbyUser subclass of NewUserWizard as well) in order to reach the accurate node person (PersonService) or to create another service but then how to link this Hobby to the node person? I am a little but lost here…

Thanks again

kevinr
Star Contributor
Star Contributor
Any of the standard Java XML parsers can be used. I think Xerces is used under the covers. A pull-parser is also present in our WAR. I would suggest JDom or Dom4J as the mechanism to process XML if you want to walk the DOM in memory.

soeursourire
Champ in-the-making
Champ in-the-making
Oki thanks for the advice, I will have a look. And about my example, what would be the easiest and fastest way to do it?

Thanks again

soeursourire
Champ in-the-making
Champ in-the-making
I just created two services Hobby and LinkHobbyPerson (looking like PersonService) so I wanted to use them from my NewUserWizard class and person-properties.jsp page. So I added hobbyService in my faces-config.xml file in NewUserWizard bean, but then I have an error on this property and cannot load the page. Is there something else to do to use our own services?

soeursourire
Champ in-the-making
Champ in-the-making
Pleeaassee helpSmiley Happy
And is it possible to use sys:base as parent in our custom types or we will get into troubles?