main() { int choice,item; do { printf( "Enter ur choice\n" ); printf( "1->ADD NEW NODE\n" ); printf( "2->DISPLAY NODE\n" ); printf( "3->EXIT\n" ); scanf( "%d",&choice ); switch(choice) { case 1: printf( "Enter the data u want to insert\n" ); scanf( "%d",&item ); add_el(&ptr,item); break; case 2: printf( "Entered elements are : \n" ); disp_el(&ptr); break; case 3: exit(0); break; } }while(choice!=3); getch(); }
Element:: Element (::XSCRT::XML::Element< wchar_t > const& e) :Base (e), regulator__ () { ::XSCRT::Parser< wchar_t > p (e); while (p.more_elements ()) { ::XSCRT::XML::Element< wchar_t > e (p.next_element ()); ::std::basic_string< wchar_t > n (::XSCRT::XML::uq_name (e.name ())); if (n == L"value") { ::XMLSchema::string< wchar_t >::_ptr t (new ::XMLSchema::string< wchar_t > (e)); add_value (t); } else if (n == L"long") { ::XMLSchema::long_::_ptr t (new ::XMLSchema::long_ (e)); add_long (t); } else if (n == L"el") { ::Recursive::Element::_ptr t (new ::Recursive::Element (e)); add_el (t); } else { } } }