找回密码
 注册
查看: 662|回复: 0

R语言 XML包 print.XMLAttributeDef()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 23:57:40 | 显示全部楼层 |阅读模式
print.XMLAttributeDef(XML)
print.XMLAttributeDef()所属R语言包:XML

                                        Methods for displaying XML objects
                                         显示XML对象的方法

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

These different methods attempt to provide a convenient way to display R objects representing XML elements when they are printed in the usual manner on the console, files, etc. via the print function. Each typically outputs its contents in the way that they would appear in an XML document.
这些不同的方法试图提供一个方便的方式来显示R对象代表XML元素时,他们通常的方式印在控制台上,文件等通过print功能。每个通常输出的方式,他们将出现在XML文档中的内容。


用法----------Usage----------


## S3 method for class 'XMLNode'
print(x, ..., indent= "", tagSeparator = "\n")
## S3 method for class 'XMLComment'
print(x, ..., indent = "", tagSeparator = "\n")
## S3 method for class 'XMLTextNode'
print(x, ..., indent = "", tagSeparator = "\n")
## S3 method for class 'XMLCDataNode'
print(x, ..., indent="", tagSeparator = "\n")
## S3 method for class 'XMLProcessingInstruction'
print(x, ..., indent="", tagSeparator = "\n")
## S3 method for class 'XMLAttributeDef'
print(x, ...)
## S3 method for class 'XMLElementContent'
print(x, ...)
## S3 method for class 'XMLElementDef'
print(x, ...)
## S3 method for class 'XMLEntity'
print(x, ...)
## S3 method for class 'XMLEntityRef'
print(x, ..., indent= "", tagSeparator = "\n")
## S3 method for class 'XMLOrContent'
print(x, ...)
## S3 method for class 'XMLSequenceContent'
print(x, ...)



参数----------Arguments----------

参数:x
the XML object to be displayed
要显示的XML对象


参数:...
additional arguments for controlling the output from print. Currently unused.
额外的参数用于控制打印输出。目前未使用。


参数:indent
a prefix that is emitted before the node to indent it relative to its parent and child nodes. This is appended with a space at each succesive level of the tree. If no indentation is desired (e.g. when xmlTreeParse is called with trim and ignoreBlanks being FALSE) and TRUE respectively, one can pass the value FALSE for this indent argument.  
之前发出的节点缩进它相对于它的父和子节点的前缀。这是附加的空间在每个succesive树水平。如果没有缩进是理想的(例如,当xmlTreeParse被称为与trim和ignoreBlanks是FALSE)TRUE,人们可以通过值<X 这个FALSE参数。


参数:tagSeparator
when printing nodes, successive nodes and children are by default displayed on new lines for easier reading. One can specify a string for this argument to control how the elements are separated in the output.  The primary purpose of this argument is to allow no space between the elements, i.e. a value of "".  
当连续印刷节点,节点和儿童默认情况下,显示在新的生产线,以便于阅读。你可以指定此参数控制在一个字符串中的元素是分开的输出。这种说法的主要目的是让之间没有空格的元素,即价值的""。


值----------Value----------

Currently, NULL.
目前,NULL。


注意----------Note----------

We could make the node classes self describing with information about whether ignoreBlanks was TRUE or FALSE and if trim was TRUE or FALSE. This could then be used to determine the appropriate values for indent and tagSeparator. Adding an S3 class element would allow this to be done without the addition of an excessive number of classes.
我们可以使节点类的自我描述信息是否ignoreBlanksTRUE或FALSE和装饰是TRUE或FALSE。这可被用来确定适当的值indent和tagSeparator。添加S3类元素,允许不加了过多的类必须这样做。


(作者)----------Author(s)----------


Duncan Temple Lang



参考文献----------References----------

<h3>See Also</h3>   <code>xmlTreeParse</code>

实例----------Examples----------


  fileName <- system.file("exampleData", "event.xml", package ="XML")

     # Example of how to get faithful copy of the XML.[如何获得忠实地复制的XML的示例。]
  doc = xmlRoot(xmlTreeParse(fileName, trim = FALSE, ignoreBlanks = FALSE))
  print(doc, indent = FALSE, tagSeparator = "")

     # And now the default mechanism[而现在的默认机制]
  doc = xmlRoot(xmlTreeParse(fileName))
  print(doc)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-24 16:44 , Processed in 0.027188 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表