Oops, I guess I assumed you were doing Java. I don't know of a php
library that does FOXML parsing, so you might find it easiest to
experiment a bit more with the DOM api. If you post or link to your
code, perhaps someone on the list can advise better on why get
getELement* methods aren't behaving as expected. FOXML is valid XML,
so any well-behaving DOM library should be able to parse it.
- Chris
On Wed, Mar 16, 2011 at 4:50 PM, Shrestha, Biva <shresthab@...> wrote:
> Thanks Chris,
> Is there a php version of the library?
>
> Biva
> ________________________________________
> From: cwilper@... [cwilper@...] On Behalf Of Chris Wilper [cwilper@...]
> Sent: Wednesday, March 16, 2011 2:28 PM
> To: Support and info exchange list for Fedora users.
> Cc: Shrestha, Biva
> Subject: Re: [fcrepo-user] DOm parser
>
> Hi Biva,
>
> It's probably possible to play around with the DOM API and get the
> results you want, but you could perhaps more easily use the
> fcrepo-dto-foxml library I wrote to do what you want. This library
> makes it pretty easy to read/write FOXML in Java. It's not finished
> yet, but I think it would be handy for what you're trying to do.
>
> Here's an example program that that takes two arguments: a FOXML
> filename and a datastream id. It then prints the content of the inline
> datastream to standard output. This dto libraries treat the audit
> trail as any other inline XML datastream, so you can call this program
> with AUDIT as the datastream id and get the content as a string.
>
> https://github.com/cwilper/fcrepo-dto-example/blob/master/src/main/java/com/github/cwilper/fcrepo/dto/example/PrintDatastream.java
>
> This is part of an example Maven project that you can check out and
> use as a template for your own application if you want to use the
> fcrepo-dto libraries:
>
> https://github.com/cwilper/fcrepo-dto-example
>
> - Chris
>
> On Tue, Mar 15, 2011 at 6:09 PM, Shrestha, Biva <shresthab@...> wrote:
>> Hi all,
>> I am trying to parse the FOXML file for a digital object using DOM parser. I am doing this because I need to extract the audit trails. I do not get any error while parsing but all of the functions like getElementById, getElementsByTagName returns empty node list. Is there a different parser for FOXML standard or the DOM parser should work. Also if there is any API service that can do the same function of getting audit trails that would be great too. I know there is a service called getObjectHistory but it returns timestamps only. we need all the information in the audit trail.
>>
>> thanks
>> Biva
>> ------------------------------------------------------------------------------
>> Colocation vs. Managed Hosting
>> A question and answer guide to determining the best fit
>> for your organization - today and in the future.
>> http://p.sf.net/sfu/internap-sfd2d
>> _______________________________________________
>> Fedora-commons-users mailing list
>> Fedora-commons-users@...
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>>
>
|