Using XML in Property Elements

Although property values are mostly text or resources that you reference, they can also be straight XML. In that case, you just set the parseType attribute of the property to "Literal".

For example, I'm using my own XML elements, such as <BirthCity> and <BirthCountry> in the <Creator> property here, and giving them their own namespace, ns:

<?xml version="1.0" ?>

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://www.purl.org/DC/"

    xmlns:ns="http://www.starpowder.com/namespace/">
    <rdf:Description about="http://www.starpowder.com/planets.html">
        <dc:Creator parseType="Literal">
            <ns:FirstName>Nicolas</nm:FirstName>
            <ns:LastName>Copernicus</nm:LastName>
            <ns:Birth>1473</nm:Birth>
            <ns:Death>1543</nm:Death>
            <ns:BirthCity>Torun</nm:BirthCity>
            <ns:BirthCountry>Poland</nm:BirthCountry>
        </dc:Creator>
    </rdf:Description>

</rdf:RDF>
				

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.171.58