
How to make notepad on mac series#
We use a series of calls to the XML library to extract each piece of information from the tree. private command processPreferencesTree pTree #How to open xml file on notepad on mac series# # Extract the text color and text size preferences. Put revXMLNodeContents(pTree, "preferences/textSize") into tTextSize Put revXMLNodeContents(pTree, "preferences/textColor") into tTextColor # These are simple nodes in the XML file, # we can get what is inside them using the revXMLNodeContents function # This function will return a string beginning with "xmlerr," # if it fails, but we don't check this # here as we created the file and we know it won't fail. # Extract the introductory message preference. We extract the contents and the # attribute in two separate calls. Put revXMLAttribute(pTree, "preferences/introMessage", "size") into tIntroMessageSize Put revXMLNodeContents(pTree, "preferences/introMessage") into tIntroMessage # The function revXMLAttribute allows us to read attributes from XML files, # its exactly the same as revXMLNodeContents, # except that you also need to tell it which attribute you want. # This is a nested list of nodes, which could have any number of items. # First, we get a list of the recent documents, then we can loop # through them and get each one in turn. # The revXMLChildNames function is useful for returning a list of nodes like this. # The last parameter is important as it tells the function to return a unique # specifier for each node, allowing us to access them correctly.


#How to open xml file on notepad on mac series#.#How to open xml file on notepad on mac code#.
