Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 142
TSQL 76
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 142
TSQL 76
SSRS 70
SSIS 66
XML 54

XML Location conversion in Java

Dec 5 2011 12:00AM by rubyroseveloso   

Hi,

Below is my sample XML data:


  
    
      ABC
      2011
    
    
      ABC
      2010
    
    
      DEF
      2011
    
  

Currently, I am using XPath to parse XPath Expressions and it is working fine.


String stringData = "count(data/books/book[name='ABC' and year='2011'] > 0"; 
XPath xpath = XPathFactory.newInstance().newXPath(); 
try 
   { 
       XPathExpression expr = xpath.compile(stringData);
       (Boolean) result = (Boolean) expr.evaluate(doc, XPathConstants.BOOLEAN); 
   }
catch (XPathExpressionException e) 
   { e.printStackTrace(); }

However, I need the stringData to be translated into this: FROM: count(data/books/book[name='ABC' and year='2011'] > 0 TO: data.books.book.name data.books.book.year

Are there any libraries that can handle this scenario?

Thanks!

Regards, Ruby

Submitted under: Microsoft SQL Server · XQUERY · XML ·  · 


rubyroseveloso
1557 · 0% · 12

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]