Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

xml and CR LF

  •  06-15-2008, 4:58 PM

    xml and CR LF

    hi,

     i tried to parse xml file like :

    <northwind>
      <Customers CustomerID="AAAAA">
        <CompanyName>BXSW</CompanyName>
      </Customers>
      <Customers CustomerID="ADVCA">
        <CompanyName>AdventureWorks Cafe</CompanyName>
      </Customers>
      <Customers CustomerID="ALFKI">
        <CompanyName>Alfreds Futterkiste</CompanyName>
      </Customers>
     </northwind>

     i want all "Customers" and their content, so i tried this :

    <Customers\b[^>]*>(.*?)</Customers>
     

    But, in appareance, the new line, carriage return and spaces make wrong result (because the same regex with xml file in one line works)

    So, how include and fixe my expression to include this special caracters ?

     

     I hope it's comprehensive (newbie in regular expression and english expression it's so strong Stick out tongue),

    thanks for your reply
     

    Filed under: ,
View Complete Thread