Note that there are some explanatory texts on larger screens.

plurals
  1. POXML/RDF to Java Objects with XSD
    primarykey
    data
    text
    <p>So here's the scenario...I have an XSD file describing all the objects that I need. I can create the objects in Java using JAXB no problem. I have an XML/RDF file that I need to parse into those objects.</p> <p>What is the EASIEST way to do this?</p> <p>I have been looking into Jena and have played around with it, but can't see how to easily map the XML/RDF file to the XSD objects that were generated. Here is a snippet of the XSD file as well as the XML/RDF file:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:a="http://langdale.com.au/2005/Message#" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" targetNamespace="http://iec.ch/TC57/2007/profile#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://langdale.com.au/2005/Message#" xmlns:m="http://iec.ch/TC57/2007/profile#"&gt; &lt;xs:annotation/&gt; &lt;xs:element name="Profile" type="m:Profile"/&gt; &lt;xs:complexType name="Profile"&gt; &lt;xs:sequence&gt; &lt;xs:element name="Breaker" type="m:Breaker" minOccurs="0" maxOccurs="unbounded"/&gt; </code></pre> <p>And the XML/RDF:</p> <pre><code>&lt;!-- CIM XML Output For switch783:(295854688) --&gt; &lt;cim:Switch rdf:ID="Switch_295854688"&gt; &lt;cim:IdentifiedObject.mRID&gt;Switch_295854688&lt;/cim:IdentifiedObject.mRID&gt; &lt;cim:IdentifiedObject.aliasName&gt;Switch_295854688&lt;/cim:IdentifiedObject.aliasName&gt; &lt;cim:ConductingEquipment.phases rdf:resource="http://iec.ch/TC57/2009/CIM-schema-cim14#PhaseCode.ABC" /&gt; &lt;cim:Switch.circuit2&gt;0001406&lt;/cim:Switch.circuit2&gt; &lt;cim:Equipment.Line rdf:resource="#Line_0001406" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload