/    Sign up×
Community /Pin to ProfileBookmark

Hi,

i want to read an xml file (and it’s nodes) with PHP.
I’ve seen some entry’s about this topic in the forum, but most of them were large code statments with no explanation.

Well, you might ask: what do you want to do with the XML file?

I want to do do this actions:

  • get all childs with a specified name, like all ‘client’ nodes. I want to get that as a tree, so i can get the child values also and treat the childs like it is another (sub) XML file.

  • From a child, i would like to get the attributes, attribute values and the child value.

  • I would like to check if a childnode does exist, within a tree.
  • If you have some info about how to ADD a node in an existing XML file, that would also be nice.

    Michel

    to post a comment
    PHP

    3 Comments(s)

    Copy linkTweet thisAlerts:
    @olafMar 10.2004 — Hallo,

    i have to do the same in the next weeks. I can suggest to start with same articles on phpbuilder.com. They talk about xml-parsers (available for download on phpclasses.org).

    I think after working on this articles it have to be clear:

    http://www.phpbuilder.com/columns/justin20000428.php3

    and

    http://www.phpbuilder.com/columns/scheffler20030325.php3

    success!
    Copy linkTweet thisAlerts:
    @Michel_v_DuijseauthorMar 10.2004 — hmm, must be reading it the wrong way, can't say it's a very clear article for me.
    Copy linkTweet thisAlerts:
    @olafMar 11.2004 — Hallo,

    I read some more about XML. In the first article (the first link) you learn something about "expat" this gives XML support in PHP (together with apache). With function you can create a XML parser (or use one from phpclasses.org).
    ×

    Success!

    Help @Michel_v_Duijse spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...