split xml into separate files - parse using java

P

precious

i'm trying to split my xml configuration file to files
implementing the parsing using xerces in java (DOMparser).
my project uses a "fromXML" parsing design and here's what i tried in
the node that i wanted outside -
public void fromXML(Node element) {
if (element.hasAttribute("fileName")){
String fileName= element.getAttribute("fileName");
element = getDOMParser().parse(fileName).getDocumentElement();
}
... continue as if it were the same file
}

problem is my xml file is associated with a xsd (scheme) and i want
the element refrenced would transperantly obtain all scheme's\flags
applied to the big xml document... without me having to explicitly
associate the node with the scheme. the original call to the first xml
(with defines the flags from the parsing and which DOM parser to use)
is not in my module and i don't have access to change anything there.
i don't want to replicate code because i want changes to way it's
parsed to be transparent
please help!
ask question if i want' clear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top