MCPcopy Create free account
hub / github.com/audacity/audacity / ParseString

Method ParseString

libraries/lib-xml/XMLFileReader.cpp:135–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135bool XMLFileReader::ParseString(XMLTagHandler *baseHandler,
136 const wxString &xmldata)
137{
138 auto utf8 = xmldata.ToUTF8();
139 const char *buffer = utf8.data();
140 int len = utf8.length();
141
142 mBaseHandler = baseHandler;
143
144 if (!ParseBuffer(baseHandler, utf8.data(), utf8.length(), true))
145 return false;
146
147 // Even though there were no parse errors, we only succeed if
148 // the first-level handler actually got called, and didn't
149 // return false.
150 if (!mBaseHandler)
151 {
152 mErrorStr = XO("Could not parse XML");
153 return false;
154 }
155
156 return true;
157}
158
159bool XMLFileReader::ParseMemoryStream(
160 XMLTagHandler* baseHandler, const MemoryStream& xmldata)

Callers 2

OnDataAvailableMethod · 0.80
ParseMethod · 0.80

Calls 2

dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected