CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Posts
    1,029

    string parsing question

    Say I have a string like this:

    string temp = "<Style id="STYLE">";

    and I want to grab the part of the string that is just in quotes, how can I do that? ie. have a new string with just STYLE in it.

    ie. string temp2 = "STYLE";

    Thanks!

  2. #2
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

    Re: string parsing question

    Not sure why you want to write your own while you can just use some other proper written XML parsers to retrieve the attribute of a node.

    1. Microsoft XML Parser SDK

    2. XMLite

    Hope this helps.

    Regards,
    Kevin Choong
    Last edited by ckweius; March 25th, 2009 at 12:23 AM.

  3. #3
    Join Date
    Nov 2006
    Location
    Australia
    Posts
    1,569

    Re: string parsing question

    There was a thread about this recently. Take a look at that.
    Good judgment is gained from experience. Experience is gained from bad judgment.
    Cosy Little Game | SDL | GM script | VLD | Syntax Hlt | Can you help me with my homework assignment?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured