how can i extract text data "only", from an ntext cell with xml code in it?

  • Guys Hi,

    I have a table with articleid and article_data as columns. Article_data is a column of ntext(4000) type.

    Inside it contains xml code of a page containing articles. I want to extract only the text that is writen by the user and not the surrounding xml code?

    is there a command extracting from a column user- data only from xml?

    any ideas more than welcome! ๐Ÿ™‚


    "If you want to get to the top, prepare to kiss alot of bottom"

  • yes you can in many ways, but you have to provide us with a sample record first.

  • Dfalir (6/23/2008)


    Guys Hi,

    I have a table with articleid and article_data as columns. Article_data is a column of ntext(4000) type.

    Inside it contains xml code of a page containing articles. I want to extract only the text that is writen by the user and not the surrounding xml code?

    is there a command extracting from a column user- data only from xml?

    any ideas more than welcome! ๐Ÿ™‚

    The first step is to convert the column to xml. To extract the data you could pass an xpath expression to the value method of the xml datatype. If you want the actual query you should post some sample data.


    * Noel

  • Ok guys, thank you for your prompt reply. I wan unable to send the sample data yesterday.

    the article_data column "sample" of a cell is like this:

    and another one

    I am sorry the user text is in Greek, but i work there! ๐Ÿ™‚ Antything you dont understant, is Greek! ๐Ÿ™‚

    Any suggestions pls?


    "If you want to get to the top, prepare to kiss alot of bottom"

  • Sorry the sample data does not appear. Another try.

    and this

    Any suggestions would be of great great help for me...


    "If you want to get to the top, prepare to kiss alot of bottom"

  • Guys the web page does not display on preview the sample data. I have put it within the code , /code, but still nothing appears. I tried also url still nothing. So the code is below but please replace the _ signs with the < sign

    _articledata>_section id='0'>_content>_![CDATA[_P class=MsoNormal style='MARGIN: 0cm 0cm 0pt'>_SPAN style='FONT-SIZE: 14pt; FONT-FAMILY: '>?? ??a ??etast??? ???t?? ???e? ?a de? t? ?st????? t?? ?a?a??e???? p??pe? ?a ???e? t?? e??? ????se??:_/SPAN>_/P> _P class=MsoNormal style='MARGIN: 0cm 0cm 0pt'>_SPAN style='FONT-SIZE: 14pt; FONT-FAMILY: '>?p? t? ยตe??? ????GG????S โ€“ ?st????? ?a?a??e???? & ep????e? t?? ep???ยต?t?? ?ยตe??ยต???e?._/SPAN>_/P> _P class=MsoNormal style='MARGIN: 0cm 0cm 0pt'>_SPAN style='FONT-SIZE: 14pt; FONT-FAMILY: '>?at?e? p??? st?? pa?a??e??a p?? ???e? ?a? รŸ??pe? a?a??t??? t??? a???ยต??? t?? ?a?t?? p?? a?t?st?????? se a?t? t?? pa?a??e??a._/SPAN>_/P>]]>_/content>_/section>_section id='1'>_content>_![CDATA[]]>_/content>_/section>_/articledata>


    "If you want to get to the top, prepare to kiss alot of bottom"

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply