AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.09.2007, 11:50   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
axaptapedia: SaxReader class
Источник: http://www.axaptapedia.com/SaxReader_class
==============

Summary:
==Sax Reader==
SAX stands for Simple API for XML. A Sax Parser is an event driven parser. Unlike the XMLDocument and DOM Parser it doesn't built up the complete document tree. Therefore it is faster than XMLDocument but you cannot reference nodes like in DOM.

==Usage==
As explained above the SAX parser is event driven. So you have to handle these events. To so create a new class that extends the SaxContentHandler class. The SaxContentHandler provides methods for handling events, like start of document, start of element node, document end, etc.


class MySaxContentHandler extends SaxContentHandler
{
protected boolean startElement(str _namespaceURI, str _localName, str _qName, SaxAttributes _attributes)
{
boolean ret;
;
ret = super(_namespaceURI, _localName, _qName, _attributes);

info(_localName);
return ret;
}
}


Next create a new SaxReader Object and register your SaxContentHandler at the reader.
The SaxReader provides two methods to start parsing: parse and parseUrl.


SaxReader reader = new SaxReader();
;
reader.contentHandler(new MySaxContentHandler());
reader.parseUrl("http://terraserver.microsoft.com/TerraService2.asmx?WSDL");


[[Image:Saxoutput.png]]

==Dynamics AX 4==
Since Dynamcis AX 4 supports .NET use the System.Xml.XmlReader class to parse XML documents.

[[Category:General development]]


Источник: http://www.axaptapedia.com/SaxReader_class
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: RunBaseBatch Blog bot DAX Blogs 0 04.04.2009 22:05
axaptapedia: RunBaseBatch Blog bot DAX Blogs 0 31.03.2009 06:06
axaptapedia: Image class Blog bot DAX Blogs 0 22.07.2008 15:05
axaptapedia: Set (Foundation class) Blog bot DAX Blogs 0 24.04.2008 20:19
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 07:03.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.