我一直在尝试读取从 DSLR Remote Pro 生成的 xml 文件中的节点,但还不能正确完成。它一直返回一个空字符串。我想要做的是从以下 xml 中获取电子邮件地址。
电子邮件.xml
<?xml version="1.0" ?>
<breeze_systems_photobooth version="1.0">
<photo_information>
<date>2011/02/24</date>
<time>12:55:31</time>
<user_data>test@domain.com</user_data>
<photobooth_images_folder>C:\Program Files\BreezeSys\DSLR Remote Pro\PhotoboothImages\Masquerade_1</photobooth_images_folder>
<photos>
<photo image="1">IMG_0004.JPG</photo>
<output>prints\20110224_125531.jpg</output>
</photos>
</photo_information>
</breeze_systems_photobooth>
get_email.ahk
#Include xpath.ahk ; include functions (only required if it is not in your
standard library) ; parsing
documents: xml :=
xpath_load("email.xml") ; load an XML
document email := xpath(xml,"/breeze_systems_photobooth/photo_information/user_data/text()")
MsgBox, %email%
我在这里想念什么?