|  | Home | Documentation | address.cpp File Reference updated Sun Dec 4 2022 by Robert van Engelen |

- Main Page
- Classes
- Files

- File List
- File Members

Functions
address.cpp File Reference
`#include <iostream>`
`#include <fstream>`
`#include "addressH.h"`
`#include "a.nsmap"`
Include dependency graph for address.cpp:

Go to the source code of this file.

## Functions
int | main ()
| Address book application: reads address.xml, displays its content, prompts the user for new contact, adds it, and saves the updated address.xml. More...
char * | user_input (const char *prompt)
| A quick-and-dirty user input function: reads string from stdin (up to 80 chars), trims leading and trailing blanks, and returns it. More...

## Function Documentation

int main | ( |  | ) |

Address book application: reads address.xml, displays its content, prompts the user for new contact, adds it, and saves the updated address.xml.

address.cpp

Address book example XML data binding application.

Illustrates the gSOAP XML data binding with wsdl2h and soappcp2.

Copyright (C) 2000-2015 Robert A. van Engelen. All Rights Reserved.

Project Source Files

- address.xsd Address book
- address.cpp Address book app (reads/writes address.xml file)
- addresstypemap.dat Schema namespace prefix name preference

Generated Files

- address.h gSOAP data binding definitions from address.xsd
- addressStub.h C++ data binding definitions
- addressH.h Serializers
- addressC.cpp Serializers
- a.nsmap XML namespace mapping file (binds 'a' URI)
- address.xml Address book data generated by address app

Build:

> wsdl2h -g -t addresstypemap.dat address.xsd soapcpp2 -2 -CS -I../../import -p address address.h c++ -I../.. address.cpp addressC.cpp -o address ../../stdsoap2.cpp

Run:

> ./address

Definition at line 81 of file address.cpp.

char * user_input | ( | const char * | prompt | ) |

A quick-and-dirty user input function: reads string from stdin (up to 80 chars), trims leading and trailing blanks, and returns it.

Parameters

  prompt | displays prompt to user

Returns
  string input

Definition at line 203 of file address.cpp.