aspose file tools*
The moose likes Product and Other Certifications and the fly likes Parsing an xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Parsing an xml file" Watch "Parsing an xml file" New topic
Author

Parsing an xml file

adrian mills
Ranch Hand

Joined: Dec 09, 2004
Posts: 63
Hi Friends,
I am parsing the following code using java.The following is an xml file.

<sql-configuration>
<type-mapping>
<database-mapping>
<databaseserver>MSSQL</databaseserver>
</database-mapping>

<function-mapping>
<function-name>Not Equal</function-name>
<function-sql><></function-sql>
</function-mapping>
</type-mapping>
</sql-configuration>

I want to replace the Not Equal to word with the following symbol <>
But it does not work.Can anyone help me out with this.
Are the escape characters right.

Or what do we use as escape character for greater than and smaller than.

Thanks in advance.
Bye
Regards
Adrian
Hari Vignesh Padmanaban
Ranch Hand

Joined: Oct 07, 2003
Posts: 578
You dont have to replace the ">" sign. You only have to replace the "<" sign. Replacing the "<" sign with & lt; (no space between & and lt; should work (I am not bale to get teh escape character displayed if I dont leave that space)

I wrote an xml file with the escape charater (for just the < sign), left the ">" sign as it is , opened it in IE and got <>.


let us know if it worked

HTH

[ May 09, 2005: Message edited by: Hari Vignesh Padmanaban

[ May 09, 2005: Message edited by: Hari Vignesh Padmanaban ]

[ May 09, 2005: Message edited by: Hari Vignesh Padmanaban ]
[ May 09, 2005: Message edited by: Hari Vignesh Padmanaban ]
 
jQuery in Action, 2nd edition
 
subject: Parsing an xml file