How to Compare XML Nodes

Extensible Markup Language files use nodes to contain each record of data you want to display on your Web page or import into your database. You can open an XML file with Windows Notepad, so even if you do not have a third-party XML editor, you can view the data and compare nodes and the nodes' values.

Instructions

    • 1

      Right-click the XML file you want to edit. Click "Open With" and select your preferred XML editor. If you do not have an editor, click "Notepad" to view the XML nodes in the text editor.

    • 2

      Locate the top-level node, which is typically the second line of code in the file. For instance, if you have a list of customers, the top-level node is "customers."

    • 3

      Locate the nodes that contain your data. The node name is dependent on the type of data contained in the file. For instance, if you have a list of customers, each node name is "customer." For instance, the following code is two nodes and the node values you can compare:

      <customer>
      <name>Joe Smith</name>
      </customer>
      <customer>
      <name>Jane Smith</name>
      </customer>

    • 4

      Press the "Ctrl" and "F" keys to open the "Find" dialog window. Type the name of the nodes in the text box and click "Find." Evaluate each node value and press the "F3" key to scroll to the next value and compare it with the previous value. This method lets you check for duplicate nodes.

    • 5

      Change the node values, if you need to change any of the information. After you finish, press the "Ctrl" and the "S" keys to save the data.

Related Searches:

References

Comments

Related Ads

Featured