Home | History | Annotate | Download | only in media_galleries
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_COMMON_MEDIA_GALLERIES_ITUNES_XML_UTILS_H_
      6 #define CHROME_COMMON_MEDIA_GALLERIES_ITUNES_XML_UTILS_H_
      7 
      8 #include <string>
      9 
     10 class XmlReader;
     11 
     12 namespace itunes {
     13 
     14 // Like XmlReader::SkipToElement, but will advance to the next open tag if the
     15 // cursor is on a close tag.
     16 bool SkipToNextElement(XmlReader* reader);
     17 
     18 // Traverse |reader| looking for a node named |name| at the current depth
     19 // of |reader|.
     20 bool SeekToNodeAtCurrentDepth(XmlReader* reader, const std::string& name);
     21 
     22 // Search within a "dict" node for |key|. The cursor must be on the starting
     23 // "dict" node when entering this function.
     24 bool SeekInDict(XmlReader* reader, const std::string& key);
     25 
     26 }  // namespace itunes
     27 
     28 #endif  // CHROME_COMMON_MEDIA_GALLERIES_ITUNES_XML_UTILS_H_
     29