<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/sem.rdfGet.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>sem.rdfGet</api:function-name><api:suggest>sem.rdfget</api:suggest><api:suggest>sem</api:suggest><api:suggest>rdfget</api:suggest><api:function-link mode="xquery" fullname="sem:rdf-get">/apidoc/8.0/sem:rdf-get.xml</api:function-link><api:function mode="javascript" name="rdfGet" lib="sem" category="Semantics" hidden="false" bucket="MarkLogic Built-In Functions" prefix="sem" namespace="http://marklogic.com/semantics" fullname="sem.rdfGet"><api:summary>
		This function returns sem:triples from a specified location.
	</api:summary><api:params><api:param name="location" type="xs:string"><api:param-description>
		  The location of the document.
	  </api:param-description><api:param-name>location</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
		  Parsing options.  Valid options include:
	<blockquote xmlns="http://www.w3.org/1999/xhtml">
        <dl>
          <dt>
             <pre>base=URI</pre>
          </dt>
        <dd>
        A base URI to use during parsing.
		</dd>
          <dt>
             <pre>graph=URI</pre>
          </dt>
        <dd>
		The graph/context value to give to quads with no 
		explicit graph specified in the data.  Cannot be used with
		override-graph=URI (or an exception is thrown).
		</dd>
          <dt>
             <pre>override-graph=URI</pre>
          </dt>
        <dd>
		The graph/context value to give to every quad, whether 
		specified in the data or not.  Cannot be used with
		graph-URI (or an exception is thrown).
        </dd>
          <dt>
             <pre>ntriple</pre>
          </dt>
        <dd>		
        Specify N-Triples format for input.
        </dd>
          <dt>
             <pre>nquad</pre>
          </dt>
        <dd>		
        Specify N-Quads format for input (default). 
		</dd>
          <dt>
             <pre>turtle</pre>
          </dt>
        <dd>	
        Specify Turtle format for input. 
		</dd>
          <dt>
             <pre>rdfxml</pre>
          </dt>
        <dd>	
        Specify RDF/XML format for input.
	    </dd>
          <dt>
             <pre>rdfjson</pre>
          </dt>
        <dd>	
        Specify RDF/JSON format for input. 
        </dd>
          <dt>
             <pre>n3</pre>
          </dt>
        <dd>		
        Specify N3 format for input.
        </dd>
		<dt>
             <pre>trig</pre>
          </dt>
        <dd>		
        Specify TriG format for input.
        </dd>
          <dt>
             <pre>repair</pre>
          </dt>
        <dd>			
		Specify to repair if possible, or discard individual triples 
		that do not parse correctly. Otherwise any malformed input 
		results in an exception.
  </dd>
           <dt>
             <pre>triplexml</pre>
          </dt>
        <dd>
                Specify <code>sem:triple</code> XML format for input, either a 
		single <code>sem:triple</code> element or multiple elements 
		under a root element.  If you use the <code>triplexml</code>
		option, you cannot specify a graph.
		</dd>
      </dl>	
    </blockquote>     
	</api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="http-opts" type="element()?" optional="true"><api:param-description>
		An options node as described for the function 
		<a href="./xdmp:http-get" xmlns="http://www.w3.org/1999/xhtml"><code>xdmp:http-get</code></a>.
   </api:param-description><api:param-name>http-opts</api:param-name><api:param-type>Node?</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:privilege>
    <p xmlns="http://www.w3.org/1999/xhtml"><code>http://marklogic.com/xdmp/privileges/xdmp-document-get</code></p> 
  </api:privilege><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var sem = require("/MarkLogic/semantics.xqy");
 
sem.rdfGet('C:/Data/Semantics/example.ttl', "turtle");
	
=&gt; 
    sem:triple(sem:iri("http://example.com/ns/data#item342"),
	sem:iri("http://example.com/ns/details#shipped"), xs:date("2013-05-20"))
    
    sem:triple(sem:iri("http://example.com/ns/data#item342"),
	sem:iri("http://example.com/ns/details#quantity"), 4)
    
    sem:triple(sem:iri("http://example.com/ns/data#item342"),
	sem:iri("http://example.com/ns/details#invoiced"), fn:false())
     
    sem:triple(sem:iri("http://example.com/ns/data#item342"),
	sem:iri("http://example.com/ns/details#costPerItem"), 10.5)
    </pre>
  </api:example></api:function></api:function-page>