How to read an entire line of raw data?

Doug
2009-04-08
2013-05-20
  • Doug

    Doug - 2009-04-08

    Hi,
    Once I find a particular element within the XML document, I need to copy the entire line.  Is there any way of getting copying the entire (raw) line to a string?

    For example, given the XML below

    <?xml version="1.0"?>
    <CONFIGURATION Version="1.00">
       <PSEUDO_PRINTER Name="dozeawhile_nrs" Copies="2" Retries="1" Interval="20"></PSEUDO_PRINTER>
       <PSEUDO_PRINTER Name="jfbrown_md" Copies="1" Retries="4" Interval="20"></PSEUDO_PRINTER>
       <PSEUDO_PRINTER Name="hsimpson_md" Copies="2" Retries="4" Interval="20"></PSEUDO_PRINTER>
       <PSEUDO_PRINTER Name="msimpson_md" Copies="3" Retries="5" Interval="20"></PSEUDO_PRINTER>
    </CONFIGURATION>

    Suppose I get to the first PSEUDO_PRINTER element, is there any way to get the entire lineI am trying to read the entire line?  In this example, I would like to have the following returned

    <PSEUDO_PRINTER Name="dozeawhile_nrs" Copies="2" Retries="1" Interval="20"></PSEUDO_PRINTER>

    Thanks!

     
    • Doug

      Doug - 2009-04-08

      Sorry, cut & paste error.  Should read as:
      ---------------
      Hi,
      Once I find a particular element within the XML document, I need to copy the entire line. Is there any way of copying the entire (raw) line to a string?

      For example, given the XML below

      <?xml version="1.0"?>
      <CONFIGURATION Version="1.00">
      <PSEUDO_PRINTER Name="dozeawhile_nrs" Copies="2" Retries="1" Interval="20"></PSEUDO_PRINTER>
      <PSEUDO_PRINTER Name="jfbrown_md" Copies="1" Retries="4" Interval="20"></PSEUDO_PRINTER>
      <PSEUDO_PRINTER Name="hsimpson_md" Copies="2" Retries="4" Interval="20"></PSEUDO_PRINTER>
      <PSEUDO_PRINTER Name="msimpson_md" Copies="3" Retries="5" Interval="20"></PSEUDO_PRINTER>
      </CONFIGURATION>

      Suppose I get to the first PSEUDO_PRINTER element, is there any way to get the entire line? In this example, I would like to have the following returned

      <PSEUDO_PRINTER Name="dozeawhile_nrs" Copies="2" Retries="1" Interval="20"></PSEUDO_PRINTER>

      Thanks!

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks