156件ヒット
[1-100件を表示]
(0.040秒)
別のキーワード
ライブラリ
- mkmf (12)
-
rexml
/ document (144)
クラス
-
REXML
:: Attribute (24) -
REXML
:: Attributes (36) -
REXML
:: Element (84)
モジュール
- Kernel (12)
キーワード
-
add
_ namespace (24) - attribute (12)
-
create
_ makefile (12) -
delete
_ namespace (12) -
get
_ attribute _ ns (12) - namespace (24)
- namespaces (24)
- prefixes (24)
検索結果
先頭5件
-
REXML
:: Attribute # prefix -> String (18132.0) -
属性の名前空間を返します。
...を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attr... -
REXML
:: Element # prefixes -> [String] (6135.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
...る prefix を文字列の配列を返します。
対象の要素とその外側の要素で定義されている prefix を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].prefixes # =>... -
REXML
:: Attributes # prefixes -> [String] (6129.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...self の中で宣言されている prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.......org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Element # namespace(prefix=nil) -> String (142.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...の文脈で prefix が指している名前空間の URI を返します。
prefix を省略すると、デフォルトの名前空間の URI を返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/docu... -
REXML
:: Element # add _ namespace(prefix , uri) -> self (138.0) -
名前空間を要素に追加します。
... prefix と uri を指定します。
引数が1個の場合はデフォルトの namespace の uri を指定します。
既に同じ prefix が存在する場合はそれが上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 're... -
Kernel
# create _ makefile(target , srcprefix = nil) -> true (125.0) -
@todo
...にインストールされます。この拡張ライブ
ラリを Ruby スクリプトから使用するときは
"require 'test/foo'" とする必要があります。
@param srcprefix ソースコードがあるディレクトリ名を指定します。......test/
foo.c
このようにします。
require 'mkmf'
create_makefile('test/foo', 'test')
このようにして作った Makefile で 'make install' すると拡張ライブラリは、
以下のパスにインストールされます。
/path/to/ruby/sitearchdir/test/foo.so... -
REXML
:: Element # add _ namespace(uri) (38.0) -
名前空間を要素に追加します。
... prefix と uri を指定します。
引数が1個の場合はデフォルトの namespace の uri を指定します。
既に同じ prefix が存在する場合はそれが上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 're... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (25.0) -
namespace と name で特定される属性を返します。
...る属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使......を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (19.0) -
属性の名前空間の URI を返します。
...す。
通常は省略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace...