EDN Admin
Well-known member
Hello,
My XML File contains comments, attribute values, attributes. I want to eliminate all of them and i just concentrating the
<span style="text-decoration:underline elements.
I want<span style="text-decoration:underline all the paths from the File, even if they are repeated.
The <span style="text-decoration:underline location where the XML file is stored is provided in the program and all the paths are retrieved, and i want to
<span style="text-decoration:underline store all the paths in a text file.
My XML file XMLDataFile.XML looks like the below.
---------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?><br/>
<!DOCTYPE Resourses SYSTEM "Resourses.dtd
<Resourses><br/>
<mastersthesis key="ms/Brown92 <br/>
<author>Kurt P. Brown</author><br/>
<title>PRPL: A Database Workload Specification Language, v1.3.</title><br/>
<year>1992</year><br/>
<school>Univ. of Wisconsin-Madison</school><br/>
</mastersthesis>
<br/>
<book key="books/mit/PapazoglouST2000 <br/>
<editor>Mike P. Papazoglou</editor><br/>
<editor>Stefano Spaccapietra</editor><br/>
<editor>Zahir Tari</editor><br/>
<title>Advances in Object-Oriented Data Modeling</title><br/>
<publisher>MIT Press</publisher><br/>
<year>2000</year><br/>
<url>db/books/collections/Papazoglou2000.html</url><br/>
<isbn>0-262-16189-3</isbn><br/>
</book><br/>
<incollection key="books/mit/shriverW87/Snyder87 <br/>
<author>Alan Snyder</author><br/>
<title>Inheritance and the Development of Encapsulated Software Systems.</title><br/>
<pages>165-188</pages><br/>
<year>1987</year><br/>
<booktitle>Research Directions in Object-Oriented Programming</booktitle><br/>
<url>db/books/collections/ShriverW87.html#Snyder87</url><br/>
</incollection><br/>
<inproceedings key="conf/colt/FisherPS91 <br/>
<author>Paul Fisher</author><br/>
<author>Stefan Pölt</author><br/>
<author>Hans-Ulrich Simon</author><br/>
<title>Probably Almost Bayes Decisions.</title><br/>
<pages>88-94</pages><br/>
<year>1991</year><br/>
<booktitle>COLT</booktitle><br/>
<ee>http://www.acm.org/pubs/citations/proceedings/colt/114836/p88-fisher/</ee><br/>
<url>db/conf/colt/colt1991.html#FisherPS91</url><br/>
</inproceedings>
<article key="tr/dec/SRC1997-018 <br/>
<editor>Paul R. McJones</editor><br/>
<title>The 1995 SQL Reunion: People, Project, and Politics, May 29, 1995.</title><br/>
<journal>Digital System Research Center Report</journal><br/>
<volume>SRC1997-018</volume><br/>
<year>1997</year><br/>
<ee>db/labs/dec/SRC1997-018.html</ee><br/>
<ee>http://www.mcjones.org/System_R/SQL_Reunion_95/</ee><br/>
<cdrom>decTR/src1997-018.pdf</cdrom><br/>
</article>
<article key="tr/dec/SRC1997-018 <br/>
<editor>Paul R. McJones</editor><br/>
<title>The 1995 SQL Reunion: People, Project, and Politics, May 29, 1995.</title><br/>
<journal>Digital System Research Center Report</journal><br/>
<volume>SRC1997-018</volume><br/>
<year>1997</year><br/>
<ee>db/labs/dec/SRC1997-018.html</ee><br/>
<ee>http://www.mcjones.org/System_R/SQL_Reunion_95/</ee><br/>
<cdrom>decTR/src1997-018.pdf</cdrom><br/>
</article>
<phdthesis key="phd/Sikeler89 <br/>
<author>Andra Sikeler</author><br/>
<title>Implementierungskonzepte für Non-Standard-Datenbanksysteme.</title><br/>
<year>1989</year><br/>
<school>Universität Kaiserslautern</school><br/>
</phdthesis>
<phdthesis key="phd/Sikeler89 <br/>
<author>Andra Sikeler</author><br/>
<title>Implementierungskonzepte für Non-Standard-Datenbanksysteme.</title><br/>
<year>1989</year><br/>
<school>Universität Kaiserslautern</school><br/>
</phdthesis>
<www key="www/com/metacrawler <br/>
<title>MetaCrawler</title><br/>
<url>http://www.metacrawler.com</url><br/>
</www>
<dataset subject="astronomy" xmlns:xlink=" http://www.w3.org/XML/XLink/0.9 http://www.w3.org/XML/XLink/0.9 <br/>
<title>Proper Motions of Stars in the Zone Catalogue -40 to -52 degrees<br/>
of 20843 Stars for 1900</title><br/>
<altname type="ADC 1005</altname><br/>
<altname type="CDS I/5</altname><br/>
<altname type="brief Proper Motions in Cape Zone Catalogue -40/-52</altname><br/>
<reference><br/>
<source><br/>
<other><br/>
<title>Proper Motions of Stars in the Zone Catalogue -40 to -52 degrees<br/>
of 20843 Stars for 1900</title><br/>
<author><br/>
<initial>J</initial><br/>
<initial>H</initial><br/>
<lastName>Spencer</lastName><br/>
</author><br/>
<author><br/>
<initial>J</initial><br/>
<lastName>Jackson</lastName><br/>
</author><br/>
<name>His Majestys Stationery Office, London</name><br/>
<publisher>???</publisher><br/>
<city>???</city><br/>
<date><br/>
<year>1936</year><br/>
</date><br/>
</other><br/>
</source><br/>
</reference><br/>
<keywords parentListURL=" http://messier.gsfc.nasa.gov/xml/keywordlists/adc_keywords.html http://messier.gsfc.nasa.gov/xml/keywordlists/adc_keywords.html <br/>
<keyword xlink:href="Positional_data.html Positional data</keyword><br/>
<keyword xlink:href="Proper_motions.html Proper motions</keyword><br/>
</keywords><br/>
<descriptions><br/>
<description><br/>
<para>This catalog, listing the proper motions of 20,843 stars<br/>
from the Cape Astrographic Zones, was compiled from three series of<br/>
photographic plates. The plates were taken at the Royal Observatory,<br/>
Cape of Good Hope, in the following years: 1892-1896, 1897-1910,<br/>
1923-1928. Data given include centennial proper motion, photographic<br/>
and visual magnitude, Harvard spectral type, Cape Photographic<br/>
Durchmusterung (CPD) identification, epoch, right ascension and<br/>
declination for 1900.</para><br/>
</description><br/>
<details/><br/>
</descriptions><br/>
<tableHead><br/>
<tableLinks><br/>
<tableLink xlink:href="czc.dat <br/>
<title>The catalogue</title><br/>
</tableLink><br/>
</tableLinks><br/>
<fields><br/>
<field><br/>
<name>---</name><br/>
<definition>Number 5</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>CZC</name><br/>
<definition>Catalogue Identification Number</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>Vmag</name><br/>
<definition>Visual Magnitude</definition><br/>
<units>mag</units><br/>
</field><br/>
<field><br/>
<name>RAh</name><br/>
<definition>Right Ascension for 1900 hours</definition><br/>
<units>h</units><br/>
</field><br/>
<field><br/>
<name>RAm</name><br/>
<definition>Right Ascension for 1900 minutes</definition><br/>
<units>min</units><br/>
</field><br/>
<field><br/>
<name>RAcs</name><br/>
<definition>Right Ascension seconds in 0.01sec 1900</definition><br/>
<units>0.01s</units><br/>
</field><br/>
<field><br/>
<name>DE-</name><br/>
<definition>Declination Sign</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>DEd</name><br/>
<definition>Declination for 1900 degrees</definition><br/>
<units>deg</units><br/>
</field><br/>
<field><br/>
<name>DEm</name><br/>
<definition>Declination for 1900 arcminutes</definition><br/>
<units>arcmin</units><br/>
</field><br/>
<field><br/>
<name>DEds</name><br/>
<definition>Declination for 1900 arcseconds</definition><br/>
<units>0.1arcsec</units><br/>
</field><br/>
<field><br/>
<name>Ep-1900</name><br/>
<definition>Epoch -1900</definition><br/>
<units>cyr</units><br/>
</field><br/>
<field><br/>
<name>CPDZone</name><br/>
<definition>Cape Photographic<br/>
Durchmusterung Zone</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>CPDNo</name><br/>
<definition>Cape Photographic Durchmusterung Number</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>Pmag</name><br/>
<definition>Photographic Magnitude</definition><br/>
<units>mag</units><br/>
</field><br/>
<field><br/>
<name>Sp</name><br/>
<definition>HD Spectral Type</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>pmRAs</name><br/>
<definition>Proper Motion in RA<br/>
<footnote><br/>
<para>the relation is pmRA = 15 * pmRAs * cos(DE)<br/>
if pmRAs is expressed in s/yr and pmRA in arcsec/yr</para><br/>
</footnote><br/>
</definition><br/>
<units>0.1ms/yr</units><br/>
</field><br/>
<field><br/>
<name>pmRA</name><br/>
<definition>Proper Motion in RA</definition><br/>
<units>mas/yr</units><br/>
</field><br/>
<field><br/>
<name>pmDE</name><br/>
<definition>Proper Motion in Dec</definition><br/>
<units>mas/yr</units><br/>
</field><br/>
</fields><br/>
</tableHead><br/>
<history><br/>
<ingest><br/>
<creator><br/>
<lastName>Julie Anne Watko</lastName><br/>
<affiliation>SSDOO/ADC</affiliation><br/>
</creator><br/>
<date><br/>
<year>1995</year><br/>
<month>Nov</month><br/>
<day>03</day><br/>
</date><br/>
</ingest><br/>
</history><br/>
<identifier>I_5.xml</identifier><br/>
</dataset><br/>
</Resourses>
---------------------------------------------------------------
Please give a C# code to implement this.
Thanks,
Sana
View the full article
My XML File contains comments, attribute values, attributes. I want to eliminate all of them and i just concentrating the
<span style="text-decoration:underline elements.
I want<span style="text-decoration:underline all the paths from the File, even if they are repeated.
The <span style="text-decoration:underline location where the XML file is stored is provided in the program and all the paths are retrieved, and i want to
<span style="text-decoration:underline store all the paths in a text file.
My XML file XMLDataFile.XML looks like the below.
---------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?><br/>
<!DOCTYPE Resourses SYSTEM "Resourses.dtd
<Resourses><br/>
<mastersthesis key="ms/Brown92 <br/>
<author>Kurt P. Brown</author><br/>
<title>PRPL: A Database Workload Specification Language, v1.3.</title><br/>
<year>1992</year><br/>
<school>Univ. of Wisconsin-Madison</school><br/>
</mastersthesis>
<br/>
<book key="books/mit/PapazoglouST2000 <br/>
<editor>Mike P. Papazoglou</editor><br/>
<editor>Stefano Spaccapietra</editor><br/>
<editor>Zahir Tari</editor><br/>
<title>Advances in Object-Oriented Data Modeling</title><br/>
<publisher>MIT Press</publisher><br/>
<year>2000</year><br/>
<url>db/books/collections/Papazoglou2000.html</url><br/>
<isbn>0-262-16189-3</isbn><br/>
</book><br/>
<incollection key="books/mit/shriverW87/Snyder87 <br/>
<author>Alan Snyder</author><br/>
<title>Inheritance and the Development of Encapsulated Software Systems.</title><br/>
<pages>165-188</pages><br/>
<year>1987</year><br/>
<booktitle>Research Directions in Object-Oriented Programming</booktitle><br/>
<url>db/books/collections/ShriverW87.html#Snyder87</url><br/>
</incollection><br/>
<inproceedings key="conf/colt/FisherPS91 <br/>
<author>Paul Fisher</author><br/>
<author>Stefan Pölt</author><br/>
<author>Hans-Ulrich Simon</author><br/>
<title>Probably Almost Bayes Decisions.</title><br/>
<pages>88-94</pages><br/>
<year>1991</year><br/>
<booktitle>COLT</booktitle><br/>
<ee>http://www.acm.org/pubs/citations/proceedings/colt/114836/p88-fisher/</ee><br/>
<url>db/conf/colt/colt1991.html#FisherPS91</url><br/>
</inproceedings>
<article key="tr/dec/SRC1997-018 <br/>
<editor>Paul R. McJones</editor><br/>
<title>The 1995 SQL Reunion: People, Project, and Politics, May 29, 1995.</title><br/>
<journal>Digital System Research Center Report</journal><br/>
<volume>SRC1997-018</volume><br/>
<year>1997</year><br/>
<ee>db/labs/dec/SRC1997-018.html</ee><br/>
<ee>http://www.mcjones.org/System_R/SQL_Reunion_95/</ee><br/>
<cdrom>decTR/src1997-018.pdf</cdrom><br/>
</article>
<article key="tr/dec/SRC1997-018 <br/>
<editor>Paul R. McJones</editor><br/>
<title>The 1995 SQL Reunion: People, Project, and Politics, May 29, 1995.</title><br/>
<journal>Digital System Research Center Report</journal><br/>
<volume>SRC1997-018</volume><br/>
<year>1997</year><br/>
<ee>db/labs/dec/SRC1997-018.html</ee><br/>
<ee>http://www.mcjones.org/System_R/SQL_Reunion_95/</ee><br/>
<cdrom>decTR/src1997-018.pdf</cdrom><br/>
</article>
<phdthesis key="phd/Sikeler89 <br/>
<author>Andra Sikeler</author><br/>
<title>Implementierungskonzepte für Non-Standard-Datenbanksysteme.</title><br/>
<year>1989</year><br/>
<school>Universität Kaiserslautern</school><br/>
</phdthesis>
<phdthesis key="phd/Sikeler89 <br/>
<author>Andra Sikeler</author><br/>
<title>Implementierungskonzepte für Non-Standard-Datenbanksysteme.</title><br/>
<year>1989</year><br/>
<school>Universität Kaiserslautern</school><br/>
</phdthesis>
<www key="www/com/metacrawler <br/>
<title>MetaCrawler</title><br/>
<url>http://www.metacrawler.com</url><br/>
</www>
<dataset subject="astronomy" xmlns:xlink=" http://www.w3.org/XML/XLink/0.9 http://www.w3.org/XML/XLink/0.9 <br/>
<title>Proper Motions of Stars in the Zone Catalogue -40 to -52 degrees<br/>
of 20843 Stars for 1900</title><br/>
<altname type="ADC 1005</altname><br/>
<altname type="CDS I/5</altname><br/>
<altname type="brief Proper Motions in Cape Zone Catalogue -40/-52</altname><br/>
<reference><br/>
<source><br/>
<other><br/>
<title>Proper Motions of Stars in the Zone Catalogue -40 to -52 degrees<br/>
of 20843 Stars for 1900</title><br/>
<author><br/>
<initial>J</initial><br/>
<initial>H</initial><br/>
<lastName>Spencer</lastName><br/>
</author><br/>
<author><br/>
<initial>J</initial><br/>
<lastName>Jackson</lastName><br/>
</author><br/>
<name>His Majestys Stationery Office, London</name><br/>
<publisher>???</publisher><br/>
<city>???</city><br/>
<date><br/>
<year>1936</year><br/>
</date><br/>
</other><br/>
</source><br/>
</reference><br/>
<keywords parentListURL=" http://messier.gsfc.nasa.gov/xml/keywordlists/adc_keywords.html http://messier.gsfc.nasa.gov/xml/keywordlists/adc_keywords.html <br/>
<keyword xlink:href="Positional_data.html Positional data</keyword><br/>
<keyword xlink:href="Proper_motions.html Proper motions</keyword><br/>
</keywords><br/>
<descriptions><br/>
<description><br/>
<para>This catalog, listing the proper motions of 20,843 stars<br/>
from the Cape Astrographic Zones, was compiled from three series of<br/>
photographic plates. The plates were taken at the Royal Observatory,<br/>
Cape of Good Hope, in the following years: 1892-1896, 1897-1910,<br/>
1923-1928. Data given include centennial proper motion, photographic<br/>
and visual magnitude, Harvard spectral type, Cape Photographic<br/>
Durchmusterung (CPD) identification, epoch, right ascension and<br/>
declination for 1900.</para><br/>
</description><br/>
<details/><br/>
</descriptions><br/>
<tableHead><br/>
<tableLinks><br/>
<tableLink xlink:href="czc.dat <br/>
<title>The catalogue</title><br/>
</tableLink><br/>
</tableLinks><br/>
<fields><br/>
<field><br/>
<name>---</name><br/>
<definition>Number 5</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>CZC</name><br/>
<definition>Catalogue Identification Number</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>Vmag</name><br/>
<definition>Visual Magnitude</definition><br/>
<units>mag</units><br/>
</field><br/>
<field><br/>
<name>RAh</name><br/>
<definition>Right Ascension for 1900 hours</definition><br/>
<units>h</units><br/>
</field><br/>
<field><br/>
<name>RAm</name><br/>
<definition>Right Ascension for 1900 minutes</definition><br/>
<units>min</units><br/>
</field><br/>
<field><br/>
<name>RAcs</name><br/>
<definition>Right Ascension seconds in 0.01sec 1900</definition><br/>
<units>0.01s</units><br/>
</field><br/>
<field><br/>
<name>DE-</name><br/>
<definition>Declination Sign</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>DEd</name><br/>
<definition>Declination for 1900 degrees</definition><br/>
<units>deg</units><br/>
</field><br/>
<field><br/>
<name>DEm</name><br/>
<definition>Declination for 1900 arcminutes</definition><br/>
<units>arcmin</units><br/>
</field><br/>
<field><br/>
<name>DEds</name><br/>
<definition>Declination for 1900 arcseconds</definition><br/>
<units>0.1arcsec</units><br/>
</field><br/>
<field><br/>
<name>Ep-1900</name><br/>
<definition>Epoch -1900</definition><br/>
<units>cyr</units><br/>
</field><br/>
<field><br/>
<name>CPDZone</name><br/>
<definition>Cape Photographic<br/>
Durchmusterung Zone</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>CPDNo</name><br/>
<definition>Cape Photographic Durchmusterung Number</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>Pmag</name><br/>
<definition>Photographic Magnitude</definition><br/>
<units>mag</units><br/>
</field><br/>
<field><br/>
<name>Sp</name><br/>
<definition>HD Spectral Type</definition><br/>
<units>---</units><br/>
</field><br/>
<field><br/>
<name>pmRAs</name><br/>
<definition>Proper Motion in RA<br/>
<footnote><br/>
<para>the relation is pmRA = 15 * pmRAs * cos(DE)<br/>
if pmRAs is expressed in s/yr and pmRA in arcsec/yr</para><br/>
</footnote><br/>
</definition><br/>
<units>0.1ms/yr</units><br/>
</field><br/>
<field><br/>
<name>pmRA</name><br/>
<definition>Proper Motion in RA</definition><br/>
<units>mas/yr</units><br/>
</field><br/>
<field><br/>
<name>pmDE</name><br/>
<definition>Proper Motion in Dec</definition><br/>
<units>mas/yr</units><br/>
</field><br/>
</fields><br/>
</tableHead><br/>
<history><br/>
<ingest><br/>
<creator><br/>
<lastName>Julie Anne Watko</lastName><br/>
<affiliation>SSDOO/ADC</affiliation><br/>
</creator><br/>
<date><br/>
<year>1995</year><br/>
<month>Nov</month><br/>
<day>03</day><br/>
</date><br/>
</ingest><br/>
</history><br/>
<identifier>I_5.xml</identifier><br/>
</dataset><br/>
</Resourses>
---------------------------------------------------------------
Please give a C# code to implement this.
Thanks,
Sana
View the full article