Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-15-2009, 05:52 PM
Elenna Elenna is offline
 
Join Date: Jan 2006
Location: St. Charles, MO
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Displaying XML Results in Table

I am looking to (minimally) scrape the info from am XML file and display it in a table on my web site (either a php file or a template).

Any idea how to do that?

As seen in this guide, here are some examples (there might be a few XML files that I'd want to):

Code:
  <apiresponse>
    <guild name="The crafting union" world="Landroval" theme="Mixed Kinship Theme" memberCount="148">
      <characters>
        <character name="Drahc" level="13" class="Champion" race="Dwarf" rank="Recruit"/>
        <character name="Kimwen" level="17" class="Rune-keeper" race="Elf" rank="Recruit"/>
        <character name="Lorrow" level="22" class="Lore-master" race="Race of Man" rank="Recruit"/>
        <character name="Lycaeum" level="50" class="Champion" race="Dwarf" rank="Recruit"/>
        <character name="Madrina" level="23" class="Minstrel" race="Hobbit" rank="Recruit"/>
        <character name="Midora" level="32" class="Hunter" race="Hobbit" rank="Recruit"/>
        <character name="Pildo" level="12" class="Minstrel" race="Hobbit" rank="Recruit"/>
        <character name="Ronarin" level="10" class="Guardian" race="Race of Man" rank="Recruit"/>
      </characters>
    </guild>
  </apiresponse>
Code:
  <?xml version="1.0" encoding="UTF-8" ?> 
  <apiresponse>
  <character name="Valdidar" world="Landroval" monster="0" race="Race of Man" class="Lore-master" level="53" origin="Gondor">
    <guild name="Knights of the White Lady" rank="Member" type="Mixed Kinship Theme" /> 
    <vocation name="Armsman">
      <professions>
        <profession name="Weaponsmith" proficiency="5" mastery="5" /> 
        <profession name="Woodworker" proficiency="4" mastery="3" /> 
        <profession name="Prospector" proficiency="6" mastery="5" /> 
      </professions>
    </vocation>
    <pvmp ratingPoints="1111.44" gloryPoints="4789" gloryRank="3" /> 
    <stats>
      <stat name="morale" value="2996" /> 
      <stat name="power" value="2206" /> 
      <stat name="armour" value="1987" /> 
      <stat name="might" value="117" /> 
      <stat name="agility" value="194" /> 
      <stat name="vitality" value="318" /> 
      <stat name="will" value="277" /> 
      <stat name="fate" value="286" /> 
      <stat name="radiance" value="0" /> 
    </stats>
    <equipment>
      <item name="Hat of the Elder Days" slot="Head" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879094671" /> 
      <item name="Survivor's Robe" slot="Chest" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145632" /> 
      <item name="Feldskyn Leggings" slot="Legs" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879102465" /> 
      <item name="Gloves of the Elder Days" slot="Gloves" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879094666" /> 
      <item name="Scholar of N?r-khelab" slot="Boots" lorebookEntry="http://lorebook.lotro.com/wiki/Special:LotroResource?id=1879145637" /> 
    </equipment>
  </character>
  </apiresponse>
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06619 seconds
  • Memory Usage 2,248KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete