Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: includes in xml-files? Date: Fri, 04 Nov 2011 18:20:17 -0700 Organization: Canadian Mind Products Lines: 39 Message-ID: References: Reply-To: Roedy Green NNTP-Posting-Host: Z2l1DcCELS0rATq8NqV4Sw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9553 On Fri, 04 Nov 2011 06:12:52 +0100, Magnus Warker wrote, quoted or indirectly quoted someone who said : >Hi, > >I have an XML-File in the classpath and I read it in with >getResourceAsStream (Pseudocode): > >InputStream stm = class.getResourceAsStream (...); >DocumentBuilderFactory ftr = DocumentBuilderFactory.newInstance (); >ftr.setIgnoringComments (true); >DocumentBuilder bld = ftr.newDocumentBuilder(); >Document doc = bld.parse (stm); > >Now I would like to source out some of the contents into separate >xml-files and include them into the main file. > >Is this possible, in particular when the files are loaded as resource >stream? > >How can I do that? WhatÄs the syntax for the include directives? Here are a couple of kludges. At least they are comprehensible. http://www.dpawson.co.uk/xsl/sect2/N4760.html#d6065e238 -- Roedy Green Canadian Mind Products http://mindprod.com Capitalism has spurred the competition that makes CPUs faster and faster each year, but the focus on money makes software manufacturers do some peculiar things like deliberately leaving bugs and deficiencies in the software so they can soak the customers for upgrades later. Whether software is easy to use, or never loses data, when the company has a near monopoly, is almost irrelevant to profits, and therefore ignored. The manufacturer focuses on cheap gimicks like dancing paper clips to dazzle naive first-time buyers. The needs of existing experienced users are almost irrelevant. I see software rental as the best remedy.