Home | Develop | Download | Contact
example_ra_string_xml.cpp
1
34#include <iostream>
35#include <Pds/Ra>
36
37
38int main(void)
39{
40 std::string input ="This <ul>pretty <ul>long data</ul> here</ul> newlines be <ul>literal as </ul> usual.";
41 std::vector<std::string> dat;
42 std::vector<std::string> tag;
43
44 std::cout<<"\n";
45 dat=Pds::Ra::SubsXmlInString(input,true,tag);
48
49 std::cout<<"\n";
50 dat=Pds::Ra::SubsXmlInString(input,false,tag);
53
54 dat.clear();
55 tag.clear();
56 dat=Pds::Ra::SubsXmlInString("Hola <name> Fernando </name> como está <fisrt> \tpujaico </fisrt>?.",false,tag);
59
60 return 0;
61}
std::vector< std::string > SubsXmlInString(const std::string &str, bool Full, std::vector< std::string > &Tag)
Busca etiquetas tag entre '<' y '>' de modo de que se busca la forma <tag> dato </tag>....
bool PrintVectorString(const std::vector< std::string > &str)
Print each string of a vector string in a new line in a text file.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed