Jump to content

Search the Community

Showing results for tags 'jaxb'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. I use JAXB with SAXParserFactory to read in a xml that contains other inclusions. For example, this following xml is called “TheFile.xml” and it refers to “class_common.xml” . <!DOCTYPE page [ <!ENTITY class_common SYSTEM "class_common.xml" >]> <api xmlns:denp="http://intranet.denali.com/wiki/DocBook_profiling"> &class_common; But what I notice is the default location used in SAXParserFactory for “class_common.xml” is where I launch the program . For example, my program is stared from DIR1 and both xml files are in DIR2, SAXParserFactory reads the “TheFile.xml” and tries to look for the “class_common.xml” from DIR1 instead of DIR2. How do I fix this? The code I have is like the following cl = class_xml.ObjectFactory.class.getClassLoader(); context = JAXBContext.newInstance("class_xml", cl); Unmarshaller u = context.createUnmarshaller(); SAXParserFactory spf = SAXParserFactory.newInstance(); spf.setXIncludeAware(true); XMLReader xr = (XMLReader) spf.newSAXParser().getXMLReader(); SAXSource source = new SAXSource(xr, new InputSource(new FileInputStream(classXMLFile))); api = (Api) u.unmarshal(source);
×
×
  • Create New...