Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007, 05:28 PM
Member
 
Join Date: May 2007
Posts: 42
Freddie is on a distinguished road
XML filtered
I have searched in forums, tutorials and manual but I couldn´t find anything about xml filtered.
I have found an API calls DOM, but
I give you an example, maybe you can help me:

I have the follow XML code:
<XML>
<ROW Name="Marty" Surname="Crespi"
Email="crespi.marty@gmail.com"/>
<ROW Name="Pepito" Surname="Ape Pepito"
Email="pepito@suemail.com.co"/>
<ROW Name="Pepito" Surname="Ape Pepito2"
Email="pepito2@suemail.com"/>
</XML>
I need something that allows me manipulate this xml:
example
"Search information about an attribute: search from "surname" the string "crespi"
Filter a data from an attribute, for example: returns in an other xml, the rows that match with the conditions in the filter, for example Name="Pepito".

well, and then can insert new rows, modify, and delete them
Thank you very much!

Last edited by Freddie : 06-01-2007 at 02:57 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-05-2007, 05:47 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Please read the following tutorial. It will help you:

Parsing, Modifying, and outputting XML Documents with Java
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-09-2007, 02:45 PM
Member
 
Join Date: May 2007
Posts: 39
Nick15 is on a distinguished road
hello
Freddie, you can use XPath. Maybe there are libraries, anyway is in J2SE 1.5:

javax.xml.xpath (Java 2 Platform SE 5.0)

If you have 1.4 version, you don´t find in libraries of java
I recommend this:
ONJava.com -- Parsing an XML Document with XPath

A tutorial of expressions XPath (XPath is independent of Java):

XPath Tutorial

more information about XPath and Java, when JDK 1.5 doesn´t exist:

Effective XML processing with DOM and XPath in Java
In this times, they use Xalan as library of XPath, and it needs Xerces libraries

Xalan-Java Version 2.7.0

good luck
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply

« Xml-fo | Xml Editor »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Filtered Streams Java Tip Java Tips 0 12-12-2007 11:30 AM


All times are GMT +3. The time now is 09:39 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org