summaryrefslogtreecommitdiffstats
path: root/chrome/common/itunes_xml_utils.h
blob: 8bfef575b4a224ffd412ae731ee4f4df7878fa8a (plain)
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
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_ITUNES_XML_UTILS_H_
#define CHROME_COMMON_ITUNES_XML_UTILS_H_

#include <string>

class XmlReader;

namespace itunes {

// Like XmlReader::SkipToElement, but will advance to the next open tag if the
// cursor is on a close tag.
bool SkipToNextElement(XmlReader* reader);

// Traverse |reader| looking for a node named |name| at the current depth
// of |reader|.
bool SeekToNodeAtCurrentDepth(XmlReader* reader, const std::string& name);

// Search within a "dict" node for |key|. The cursor must be on the starting
// "dict" node when entering this function.
bool SeekInDict(XmlReader* reader, const std::string& key);

}  // namespace itunes

#endif  // CHROME_COMMON_ITUNES_XML_UTILS_H_