Storing strings in XML file

This is a discussion on Storing strings in XML file within the C++ Programming forums, part of the General Programming Boards category; Hi there, Could someone help me with information on how to store strings of arbitrary length to the XML file ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    1

    Arrow Please help - storing strings in XML file

    Hi there,

    Could someone help me with information on how to store strings of arbitrary length to the XML file and then retrieve them
    into a CStdString (really std::string) object?
    Also how to store arbitrary binary data in the XML files?

    At the moment i have:

    Code:
    case simplexmlValueTypeString:
    {
    	simplexmlValueString* pp = new simplexmlValueString();
    	if (data)
    		pp->Set((const wchar_t*)data);
    	else if (stringValue)
    		pp->Set(stringValue);
    	p=pp;
    	break;
    }
    but that doesn't work with lengthy strings!
    Any ideas

    Thanks for your help
    Last edited by Nina; 03-08-2004 at 11:56 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. Writing strings to file
    By Ichmael™ in forum C++ Programming
    Replies: 6
    Last Post: 07-12-2005, 12:37 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21