• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling XML Docs

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to have several XML documents rather than one huge doc that branches out all the possibilities. This will save time and effort on the server's part as far as I can see. But I can't find anything so far that tells me how to call one xml from another once a selection is made.

What I'm trying to do exactly is that when a user selects a region, all the markets for that region come up, then when they select a market, all the files for that market come up, then fields, etc.

How do I do this, or can I?

Thanks very much for your time.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
XML is just a hierarchical format for describing structured documents. You can't really "call" other documents from XML except by including them using an ENTITY reference.

You might consider introducing your own "call" element and simply process it manually with Java, i.e. parse the XML, look for the call element, parse the file referred to by the call element, and merge the contents of the two files (the original and the one it "called") in memory before displaying to the client.

You could also do this by running the XML document through an XSL stylesheet that uses the document() function to include arbitrary XML documents into the output.
 
No holds barred. And no bars holed. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic