Menu

[r22]: / src / xmlparseschemans.cpp  Maximize  Restore  History

Download this file

32 lines (27 with data), 807 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <string>
#include <vector>
#include <stdexcept>
#include <expat.h>
#include "xmlparseschemans.h"
XmlParseSchemaNs::XmlParseSchemaNs() : WrapExpat ( false ), d ( new ParseSchemaNsData() )
{
d->p = p; // set parser for XML_StopParser call
XML_SetUserData ( p, d.get() );
XML_SetStartElementHandler ( p, start );
}
XmlParseSchemaNs::~XmlParseSchemaNs()
{}
void XMLCALL XmlParseSchemaNs::start ( void *data,
const XML_Char *el,
const XML_Char **attr )
{
ParseSchemaNsData *d = ( ParseSchemaNsData * ) data;
if ( !d )
return;
while ( *attr )
{
d->attributeVector.push_back ( make_pair ( *attr, * ( attr + 1 ) ) );
attr += 2;
}
XML_StopParser ( d->p, false );
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.