SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Unhappy how to convert xml to csv

    Hi

    i want to read xml data as same structure using php

    my xml data structure is

    <root>
    <modal>
    <childmodal>name</childmodal>
    <childmodal>name</childmodal>
    </modal>
    <modal>
    <childmodal>name</childmodal>
    <modal>
    <childmodal>name</childmodal>
    <childmodal>name</childmodal>
    </modal>
    <childmodal>name</childmodal>
    </modal>
    </root>

    if i use getelement by tag name as modal , i can retreive all modal data ,but i want to write same order in csv file like modal under submodal data. so any one help me how to read this structure .

  2. #2
    SitePoint Member
    Join Date
    Jun 2013
    Location
    India
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    You can just save as text file and open via excel . it will open in cell format. and then either you copy content and paste in new editor and save . or directly do save as csv. it would be converted.

    But if it would be nested then I am not sure how it will work. try it..

  3. #3
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hi elsner thank you for response. After converting the csv i will change some content then again i need the xml file. in backend there is some database process for this xml. so can you please tell how to parse

  4. #4
    SitePoint Enthusiast vincewicks's Avatar
    Join Date
    Jan 2012
    Location
    Brooklyn, NYC
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. download the xml from that url into a file
    2. load xml into openoffice or msoffice, both know how to load xml, i'm not sure but is possible to do same thing with google doc
    3. save the document as csv, using save as.
    This site is the go-to place for web designs.

  5. #5
    SitePoint Addict goldensona's Avatar
    Join Date
    Jun 2011
    Posts
    226
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vincewicks View Post
    1. download the xml from that url into a file
    2. load xml into openoffice or msoffice, both know how to load xml, i'm not sure but is possible to do same thing with google doc
    3. save the document as csv, using save as.
    i need to do in php , can you tell how to parse

  6. #6
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Helo,,,

    with the help of Luxon Software You Can Convert xml file to cxv file ....
    and you can use anyother software to convert your file..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •