[PHP] RE: RE: PHP and XML

2006-11-26 Thread onewaylife

hello all
I have created a simple xml file address.php i.e 
?php
$xmlstr = XML
?xml version=1.0 ?
!DOCTYPE AddressBook[
!ELEMENT AddressBook (person)+ 
!ELEMENT person (group,name,organization, address,email)
!ELEMENT group (#PCDATA)
!ELEMENT name (#PCDATA)
!ELEMENT organization (#PCDATA)
!ELEMENT address (#PCDATA)
!ELEMETN email (#PCDATA) ]


XML;


?
and one simple form: -
html
head
titleMy Address Book/title
/head
body
form action=addNewElement.php method=post
div
Group:input type=text size=20
name=groupbr
Namenbsp;:input type=text size=20
name=namebr
organization:input type=text size=20
name=organization br
addresss:input type=text size=20
name=ationbr
Email Address:input type=text size=20
name=email
/div
input type=submit value=Submit


/form
/body
/html
But it gives lot of error : -
Warning: SimpleXMLElement::__construct() [function.--construct]: Entity:
line 9: parser error : DOCTYPE improperly terminated in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Warning: SimpleXMLElement::__construct() [function.--construct]: !ELEMETN
email (#PCDATA) ] in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Warning: SimpleXMLElement::__construct() [function.--construct]: ^ in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Warning: SimpleXMLElement::__construct() [function.--construct]: Entity:
line 9: parser error : Start tag expected, '' not found in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Warning: SimpleXMLElement::__construct() [function.--construct]: !ELEMETN
email (#PCDATA) ] in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Warning: SimpleXMLElement::__construct() [function.--construct]: ^ in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

Fatal error: Uncaught exception 'Exception' with message 'String could not
be parsed as XML' in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php:5
Stack trace: #0
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php(5):
SimpleXMLElement-__construct('??xml version=...') #1 {main} thrown in
/home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php on
line 5

please help me out..
onewaylife












Edward Kay wrote:
 
 In that case you need to do some of your own research. Google is your
 friend.
 
 Hello Edward
 Just i don't  now where to start.


 Edward Kay wrote:
 
  Hello,
 
  You say that you are unable to store the files in XML. Why is
 this? Are
  you getting an error message or do you just not know where to start?
 
  Edward
 
  Dear All
 
  I am novice in PHP  XML, while trying I am creating a small
 application
  i.e. Address Book.
  In this I am using Apache2, PHP5 and XML no database is used.
 I have FC5
  machines. but I am unable to store the files in XML. If any one
  share their
  experience in this by providing Examples or tutorials etc...
  So far I have found tutorial related to porting the information
  of data from
  MySQL to XML and then php with help of DOM.
 
  Thanks
  onewaylife
  --
  View this message in context:
  http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
  Sent from the PHP - General mailing list archive at Nabble.com.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

 --
 View this message in context:
 http://www.nabble.com/PHP-and-XML-tf2692397.html#a7517770
 Sent from the PHP - General mailing list archive at Nabble.com.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
-- 
View this message in context: 
http://www.nabble.com/PHP-and-XML-tf2692397.html#a7555006
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP and XML

2006-11-23 Thread onewaylife

Dear All

I am novice in PHP  XML, while trying I am creating a small application
i.e. Address Book. 
In this I am using Apache2, PHP5 and XML no database is used. I have FC5
machines. but I am unable to store the files in XML. If any one share their
experience in this by providing Examples or tutorials etc... 
So far I have found tutorial related to porting the information of data from
MySQL to XML and then php with help of DOM. 

Thanks 
onewaylife
-- 
View this message in context: 
http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE: PHP and XML

2006-11-23 Thread onewaylife


Hello Edward
Just i don't  now where to start.


Edward Kay wrote:
 
 Hello,
 
 You say that you are unable to store the files in XML. Why is this? Are
 you getting an error message or do you just not know where to start?
 
 Edward
 
 Dear All

 I am novice in PHP  XML, while trying I am creating a small application
 i.e. Address Book.
 In this I am using Apache2, PHP5 and XML no database is used. I have FC5
 machines. but I am unable to store the files in XML. If any one
 share their
 experience in this by providing Examples or tutorials etc...
 So far I have found tutorial related to porting the information
 of data from
 MySQL to XML and then php with help of DOM.

 Thanks
 onewaylife
 --
 View this message in context:
 http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
 Sent from the PHP - General mailing list archive at Nabble.com.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/PHP-and-XML-tf2692397.html#a7517770
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML parser error ..

2006-11-21 Thread onewaylife

dear Richard 
I have written a PHP file in that with help of php document tags i have
created XML file in that PHP file and in xml file i have taken care of the
?xml ? tag. 
with regards 
rakesh  


Richard Lynch wrote:
 
 On Tue, November 21, 2006 2:30 am, onewaylife wrote:
 the file is : -
 html
 
 it give this output  XML parser error: Reserved XML Name
 
 One Possible Interpretation:
 
 XML files start with:
 ?xml
 
 Your file does not start with:
 ?xml
 
 Your file is not XML.
 
 Fix it.
 
 -- 
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some starving artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/XML-parser-error-..-tf2677513.html#a7485238
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php