|
|
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
привет! ктонибудь юзает jdom?? столкнулся с такой проблемой: не могу откомпилировать код вылетает вот здесь NEWElement.addAttribute(new Attribute()); с ошибкой Article.java:70: cannot find symbol symbol : constructor Attribute() location: class org.jdom.Attribute NEWElement.addAttribute(new Attribute()); пример взял c IBM (http://www.ibm.com/developerworks/ru/library/j-jdom/) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 15:11:23 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
Во-первых статья 2001го года. Во-вторых даже там я что-то не нашел вызов конструктора Attribute без параметров. В-третих попробуйте конструктор с параметрами ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 16:03:37 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
к сожалению, если даже определить атрибут, все равно выпадает с той-же ошибкой. а статья действительно старая, и вся документация на jdom.org тоже, ну кроме апи конечно в котором : Constructor Summary Attribute() Default, no-args constructor for implementations to use if needed. Attribute(java.lang.String name, java.lang.String value) This will create a new Attribute with the specified (local) name and value, and does not place the attribute in a Namespace. Attribute(java.lang.String name, java.lang.String value, int type) This will create a new Attribute with the specified (local) name, value and type, and does not place the attribute in a Namespace. Attribute(java.lang.String name, java.lang.String value, int type, Namespace namespace) This will create a new Attribute with the specified (local) name, value, and type, and in the provided Namespace. Attribute(java.lang.String name, java.lang.String value, Namespace namespace) This will create a new Attribute with the specified (local) name and value, and in the provided Namespace. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 16:19:14 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
andrei77 Attribute() Default, no-args constructor for implementations to use if needed. А чем public от protected отличается знаешь? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 17:02:37 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
контроль доступа. и что? даже если значения атрибута определены - ошибка вывваливается ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 17:20:06 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
andrei77контроль доступа. и что? И то, это же твой код: NEWElement.addAttribute(new Attribute()); andrei77даже если значения атрибута определены - ошибка вывваливается Какие значения? Как определены? Какая ошибка? Телепаты в отпуске. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 17:49:50 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
Article.java:70: cannot find symbol symbol : constructor Attribute() location: class org.jdom.Attribute NEWElement.addAttribute(new Attribute("privet", "net")); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 18:00:40 |
|
||
|
добавление Атрибута в jdom
|
|||
|---|---|---|---|
|
#18+
andrei77Article.java:70: cannot find symbol symbol : constructor Attribute() location: class org.jdom.Attribute NEWElement.addAttribute(new Attribute("privet", "net")); А вот и не стыковочка теперь. Почему в ошибке все еще constructor Attribute() без параметров? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.01.2007, 19:10:04 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=34256227&tid=2146949]: |
0ms |
get settings: |
13ms |
get forum list: |
23ms |
check forum access: |
6ms |
check topic access: |
6ms |
track hit: |
53ms |
get topic data: |
16ms |
get forum data: |
4ms |
get page messages: |
71ms |
get tp. blocked users: |
2ms |
| others: | 291ms |
| total: | 485ms |

| 0 / 0 |
