Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
XML and Related Technologies
How to get a parent node reference in JXPath??
john sal
Ranch Hand
Posts: 94
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can someone let me know how can i retrieve parent node context in jxpath.
For Example:
class Class1{ int id = 1; int type = 2; static class Class2{ String value ="value"; Class3 c3 = new Class3(); } } public class TestDemo { public static void main(String args[]){ Class1 c1 = new Class1(); Class1.Class2 c2 = new Class1.Class2(); JXPathContext context =JXPathContext.newContext(c2.c3); Pointer p = context.getPointer("."); JXPathContext relativeContext = context.getRelativeContext(p); //I got the context of class c3 now using this context i want to get reference of Class2 } public class Class3 { public int type = 4; public String id = "one"; } }
I got the context of class c3 now using this context i want to get reference of Class2.
Can someone let me know how can i get the same?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Refering to another class's instance of a different class, inside a class
Passing Array of objects to a different class
Accessing component from main class.... Help!
Please HELP...Devaka Exam Test 2 Number 69. I totally don't understand it.
Protected members
More...