vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Displaying XML Results in Table (https://vborg.vbsupport.ru/showthread.php?t=211292)

Elenna 04-15-2009 05:52 PM

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>



All times are GMT. The time now is 10:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01271 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete