Title: Import data from certain ids
Last modified: December 2, 2019

---

# Import data from certain ids

 *  Resolved [naaatasha](https://wordpress.org/support/users/naaatasha/)
 * (@naaatasha)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/import-data-from-certain-ids/)
 * I want to import xml file including items with p tags with ids. But the order
   od p tags in different items are different, so the imported values are not corresponding
   values from ids. For example element with id 70 is on the 10-th place, but in
   other item the p with id 70 is on the 12-th position. How can I import this data
   correctly?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/import-data-from-certain-ids/#post-12205009)
 * Hi [@naaatasha](https://wordpress.org/support/users/naaatasha/)
 * It sounds like you can tackle this with an XPath query. For example, let’s say
   that the p tags in your XML look like this:
 *     ```
       <p id="80">A</p>
       <p id="70">B</p>
       <p id="60">C</p>
       ```
   
 * If you drag in the second one it looks like this:
 * `{p[2]}`
 * To grab that based on the “id” attribute, you should change the XPath to this:
 * `{p[@id="70"]}`
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/import-data-from-certain-ids/#post-12225392)
 * Hi [@naaatasha](https://wordpress.org/support/users/naaatasha/)
 * I’m marking this as resolved since we haven’t heard back. Feel free to follow
   up here if you’re still having issues with this. Anyone else please open a new
   thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Import data from certain ids’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/import-data-from-certain-ids/#post-12225392)
 * Status: resolved