Hi, I'd like to know if it's possible to instantiate only a single node from a document. I'm using an xml database to return a node from some document using xquery/xpath. Once I have that node I'd like to use xmlbeans to easily access it.
So far I've come up with this: <doc> ...... <block><something>abc</something></block> .... </doc> Class 'Block' represents the block element in the xml. Node n = getNodeFromDatabaseUsingXpath("doc('.')/descendant-or-self::block[1]"); Block block = (Block) XmlBeans.getContextTypeLoader().parse(n, Block.type, null); assertEquals("abc", block.getSomething()); // block.getSomething() == null This doesn't give any exceptions, but calling block.getSomething() simply returns null. I can get it to work if I let my query return an <xml-fragment> element instead of <block>, but this is not desired in my case. Is there a better way to do this? Thanks, Ewout --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]