Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the raw XML content under a node #58

Open
marcelotto opened this issue Feb 27, 2018 · 1 comment
Open

How to get the raw XML content under a node #58

marcelotto opened this issue Feb 27, 2018 · 1 comment

Comments

@marcelotto
Copy link

I want to parse the result of a SPARQL XML result like this:

<sparql xmlns="http://www.w3.org/2005/sparql-results#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/sw/DataAccess/rf1/result2.xsd">
  <head>
    <variable name="blurb"/>
  </head>
  <results>
    <result>
      <binding name="blurb">
        <literal datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">
          <p xmlns="http://www.w3.org/1999/xhtml">My name is <b>alice</b></p>
        </literal>
      </binding>
    </result>
  </results>
</sparql>

and get everything under the literal node as a string, i.e. <p xmlns="http://www.w3.org/1999/xhtml">My name is <b>alice</b></p>.

Is this possible with SweetXML somehow?

@doughsay
Copy link

Check out this PR: #45

That adds the feature you're looking for. Go bump it and see about getting it merged. I'm trying to get a hold of the maintainers to get the other PRs merged too.

marcelotto added a commit to rdf-elixir/sparql-ex that referenced this issue Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants