Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15551

SAX2 not emiting all sections of XML document ...

From lbrt chx _ gemale
Newsgroups comp.lang.java.programmer
Subject SAX2 not emiting all sections of XML document ...
Organization Acecape, Inc.
Organization Newshosting.com - Highest quality at a great price! www.newshosting.com
Message-ID <1340492624.740783@nntp.aceinnovative.com> (permalink)
Date 2012-06-23 23:03 +0000

Show all headers | View raw


 I am trying to reproduce parts of an RDF document using a SAX2 contenthandler:
~ 
 saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
~ 
 The thing is that I just need to get rid of the <pgterms:etext ... /> sections of it, which I need to look into, check for concistency and discard.
~ 
 The data feed starts/looks like the section I pasted bellow, but the contenthandler does not pick:
~ 
 a) PI: <?xml version="1.0" encoding="UTF-8" ?>
 b) DTD declarations: <!DOCTYPE rdf:RDF [ ...
 c) comments: <!-- ...
~ 
 I still want for SAX2 to emit to me all there is in the xml doc
~ 
 How can you do such a thing?
~ 
 thanks
 lbrtchx
~ 
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE rdf:RDF [
  <!ENTITY pg  "Project Gutenberg">
  <!ENTITY lic "http://www.gutenberg.org/license">
  <!ENTITY f   "http://www.gutenberg.org/">
]>

<!-- 

The Project Gutenberg Catalog in RDF/XML Format

  Copyright (C) 2004 by 

  Project Gutenberg Literary Archive Foundation
  4557 Melan Drive S.
  Fairbanks AK 99712
  U.S.A.


LICENSE TERMS

  http://www.gnu.org/licenses/gpl.html

  http://www.gutenberg.org

-->

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:dcterms="http://purl.org/dc/terms/"
         xmlns:dcmitype="http://purl.org/dc/dcmitype/"
         xmlns:cc="http://web.resource.org/cc/"
         xmlns:pgterms="http://www.gutenberg.org/rdfterms/"
         xml:base="http://www.gutenberg.org/feeds/catalog.rdf">


<cc:Work rdf:about="">
   <cc:license  rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
</cc:Work>

<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
   <cc:permits  rdf:resource="http://web.resource.org/cc/Reproduction" />
   <cc:permits  rdf:resource="http://web.resource.org/cc/Distribution" />
   <cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
   <cc:permits  rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
   <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
   <cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
</cc:License>

<rdf:Description rdf:about="">
  <dc:created><dcterms:W3CDTF><rdf:value>2012-06-21</rdf:value></dcterms:W3CDTF></dc:created>
</rdf:Description>

<pgterms:etext rdf:ID="etext12812">
  <dc:publisher>&pg;</dc:publisher>
  <dc:title rdf:parseType="Literal">Oeuvres po?tiques Tome 2</dc:title>
  <dc:creator rdf:parseType="Literal">Christine, de Pisan, 1364?-1431?</dc:creator>
  <pgterms:friendlytitle rdf:parseType="Literal">Oeuvres po?tiques Tome 2 by de Pisan Christine</pgterms:friendlytitle>
  <dc:language><dcterms:ISO639-2><rdf:value>fr</rdf:value></dcterms:ISO639-2></dc:language>
  <dc:subject><dcterms:LCSH><rdf:value>Poetry</rdf:value></dcterms:LCSH></dc:subject>
  <dc:subject><dcterms:LCC><rdf:value>PQ</rdf:value></dcterms:LCC></dc:subject>
  <dc:created><dcterms:W3CDTF><rdf:value>2004-07-04</rdf:value></dcterms:W3CDTF></dc:created>
  <dc:rights rdf:resource="&lic;" />
</pgterms:etext>

<pgterms:file rdf:about="&f;cache/epub/40051/pg40051.plucker.pdb">
  <dc:format><dcterms:IMT><rdf:value>application/prs.plucker</rdf:value></dcterms:IMT></dc:format>
  <dcterms:extent>46148</dcterms:extent>
  <dcterms:modified><dcterms:W3CDTF><rdf:value>2012-06-20</rdf:value></dcterms:W3CDTF></dcterms:modified>
  <dcterms:isFormatOf rdf:resource="#etext40051" />
</pgterms:file>

<pgterms:file rdf:about="&f;cache/epub/40051/pg40051.qioo.jar">
  <dc:format><dcterms:IMT><rdf:value>application/x-qioo-ebook</rdf:value></dcterms:IMT></dc:format>
  <dcterms:extent>92453</dcterms:extent>
  <dcterms:modified><dcterms:W3CDTF><rdf:value>2012-06-20</rdf:value></dcterms:W3CDTF></dcterms:modified>
  <dcterms:isFormatOf rdf:resource="#etext40051" />
</pgterms:file>

</rdf:RDF>

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

SAX2 not emiting all sections of XML document ... lbrt chx _ gemale - 2012-06-23 23:03 +0000
  Re: SAX2 not emiting all sections of XML document ... Jeff Higgins <jeff@invalid.invalid> - 2012-06-23 19:51 -0400
    Re: SAX2 not emiting all sections of XML document ... Jeff Higgins <jeff@invalid.invalid> - 2012-06-23 20:20 -0400

csiph-web