Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing an xml file

 
adrian mills
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 578
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic