org.jdom.Namespace.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.jdom.Namespace.<init>()方法的一些代码示例,展示了Namespace.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.<init>()方法的具体详情如下:
包路径:org.jdom.Namespace
类名称:Namespace
方法名:<init>

Namespace.<init>介绍

[英]This constructor handles creation of a Namespace object with a prefix and URI; it is intentionally left private so that it cannot be invoked by external programs/code.
[中]这个构造函数处理带有前缀和URI的Namespace对象的创建;故意将其保留private,以便外部程序/代码无法调用它。

代码示例

代码示例来源:origin: stackoverflow.com

var Namespace = function() {
  var ClassFirst = this.ClassFirst = function() {
    this.abc = 123;
  }
  var ClassSecond = this.ClassSecond = function() {
    console.log("Cluttered way to access another class in namespace: ", new new Namespace().ClassFirst().abc);
    console.log("Nicer way to access a class in same namespace: ", new ClassFirst().abc);
  }
}

new new Namespace().ClassSecond()

代码示例来源:origin: stackoverflow.com

var xhtml = new Namespace("http://www.w3.org/1999/xhtml"),
xml = <foo/>;
xml.setNamespace(xhtml);

js> xml.toXMLString()
<e4x_0:foo xmlns:e4x_0="http://www.w3.org/1999/xhtml"/>

代码示例来源:origin: stackoverflow.com

default xml namespace = new Namespace("http://foo/bar");

代码示例来源:origin: stackoverflow.com

Namespace ns = new Namespace("AEService","http://www.tibco.com/xmlns/aemeta/services/2002")
document.add(ns);

代码示例来源:origin: stackoverflow.com

setNamespaces( ( Element ) xml.selectSingleNode( "/root/settings" ),
        new Namespace( "", "http://www.penvision.se/printprocessor" ) );

代码示例来源:origin: stackoverflow.com

new QName("exported", new Namespace("android", "http://schemas.android.com/apk/res/android"))

代码示例来源:origin: stackoverflow.com

Element root = document.getRootElement();
   Namespace namespace = new Namespace("android", "http://schemas.android.com/apk/res/android");
   for(Iterator i = root.elementIterator("receiver"); i.hasNext();)
   {
     Element e = (Element)i.next();
     System.out.println(e.attributeValue("exported"));
     System.out.println(e.attributeValue(new QName("exported", namespace)));
   }

代码示例来源:origin: stackoverflow.com

Document xmldoc = DocumentHelper.createDocument();
Namespace aeServiceNs = new Namespace("AEService",
 "http://www.tibco.com/xmlns/aemeta/services/2002");
Element root = xmldoc.addElement(new QName("jmsProducer", aeServiceNs))
           .addAttribute("objectType", "endpoint.JMSPublisher")
           .addAttribute("name", "Pub1EndPoint");
Element wireformat = root.addElement(new QName("wireFormat", aeServiceNs))
             .setText("aeXml");
OutputFormat outputFormat = OutputFormat.createPrettyPrint();
XMLWriter xmlwriter = new XMLWriter(System.out, outputFormat);
xmlwriter.write(xmldoc);

代码示例来源:origin: stackoverflow.com

Document doc = null;
 Namespace kmlns = new Namespace("http://www.opengis.net/kml/2.2");
 Element position = new Element("Position", kmlns);
 position.addContent(new Element("name", kmlns).setText(positionName));
 position.addContent(new Element("desc", kmlns).setText(description));
 position.addContent(.....   all the XML content needed for the Position ....);
 // create the XML Document in memory if the file does not exist
 // otherwise read the file from the disk
 if(!test.exists()){
     doc = new Document();
     Element root = new Element("kml", kmlns);
 } else {
     SAXBuilder sb = new SAXBuilder();
     doc = sb.build(test);
 }
 Element root = doc.getRootElement();
 // modify the XML as you need
 // add Position Element
 root.addContent(position);
 try {
   fwriter = new FileWriter(datapath+"/"+name+".kml");
   XMLOutputter xout = new XMLOutputter(Format.getPrettyFormat());
   xout.output(doc, writer);
   fwriter.flush();
   fwriter.close();
 } catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
 }

代码示例来源:origin: org.jdom/jdom-legacy

Namespace ns = new Namespace(prefix, uri);
synchronized (namespaces) {
  namespaces.put(lookup, ns);

相关文章