/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #import #import #import #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif #import #import #import #import #import #import #ifdef __clang__ #pragma clang diagnostic pop #endif @class FBXMLGenerationOptions; NS_ASSUME_NONNULL_BEGIN @interface FBXPath : NSObject /** Returns an array of descendants matching given xpath query @param root the root element to execute XPath query for @param xpathQuery requested xpath query @return an array of descendants matching the given xpath query or an empty array if no matches were found @throws NSException if there is an unexpected internal error during xml parsing */ + (NSArray> *)matchesWithRootElement:(id)root forQuery:(NSString *)xpathQuery; /** Gets XML representation of XCElementSnapshot with all its descendants. This method generates the same representation, which is used for XPath search @param root the root element @param options Optional values that affect the resulting XML creation process @return valid XML document as string or nil in case of failure */ + (nullable NSString *)xmlStringWithRootElement:(id)root options:(nullable FBXMLGenerationOptions *)options; @end NS_ASSUME_NONNULL_END