[thelist] XML Output Help
Jason Handby
jason_handby at illustraresearch.com
Wed Aug 4 11:30:33 CDT 2004
> (Man I'm full of questions today) I attempted to learn XML a
> few months ago and picked up on a few things, but a project
> has come up and now I need to know how to get the XML data
> into a human readable format. Take the following XML data
> below for example:
>
> - <xs:element name="TRAFFICSTATS">
> - <xs:annotation>
> <xs:documentation>
> Traffic statistics for the given site
> </xs:documentation>
> </xs:annotation>
> - <xs:complexType>
> - <xs:sequence>
> <xs:element ref="ITEM" maxOccurs="unbounded" />
> </xs:sequence>
> <xs:attribute name="site" type="xs:string" use="required" />
> </xs:complexType>
> </xs:element>
>
> How do I sift thought <xs: ...></xs: ...> stuff to get the
> actual text and how should I display it. I have a good
> foundation in ASP, PHP, C/C++, so I'm prepared for about
> anything you throw me. I got the above code from:
> http://client.alexa.com/partner/xsd/alexa_main.xsd
> I'm just trying to use this example as a *rather steep*
> learning curve.
That's not an XML file, that's an XML Schema Definition [1]. Basically it's
a special kind of XML file that you can use to describe the schema of your
other XML files. More about schemas here, for example:
http://www.w3schools.com/schema/schema_intro.asp
Unless you specifically meant to use a schema file, I suggest you choose
another more typical XML file as your starting point. Probably this means
looking for one with an .XML extension :-)
Jason
[1] OK, so technically it's both, because XSDs are written in XML. But you
know what I mean.
More information about the thelist
mailing list