Skip to content

Cannot get tag called id from each entry in Atom feed #9

@dchang0

Description

@dchang0

Hi--

I have an Atom feed that has a tag in each entry called id like so:

<id>https://domain.org/view/a38171</id>

I am trying to get at this tag using:

$feed->items[0]->getTag('id')

But it gets nothing.

If I use $feed->items[0]->getId() it gets the unique hash as expected, but I need the original id tag from the feed entry for further processing.

Forgot to mention that I also tried using the namespace like so and did not get any response:

$feed->items[0]->getTag('http://www.w3.org/2005/Atom:id')

The namespace above is the only one returned by:

$feed->items[0]->namespaces

Any suggestions?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions